当前位置: 首页 > news >正文

样品门展厅设计图片seo培训班

样品门展厅设计图片,seo培训班,信用网站建设意义,wordpress展示页面模板概述 在大数据测试环境搭建时,经常会用到 ssh 免密登录 ,方便机器之间分发文件,从一个机器上登录至其它机器也方便 如何配置 linux 的 ssh 免密登录? 非免密登录 端口是22 [rootKS8P-Test-K8S06 ~]# ssh KS8P-Test-K8S06端口非22 [roo…

概述

大数据测试环境搭建时,经常会用到 ssh 免密登录 ,方便机器之间分发文件,从一个机器上登录至其它机器也方便

如何配置 linuxssh 免密登录?

非免密登录

端口是22

[root@KS8P-Test-K8S06 ~]# ssh KS8P-Test-K8S06

端口非22

[root@KS8P-Test-K8S05 ~]# ssh KS8P-Test-K8S05
ssh: connect to host ks8p-test-k8s05 port 22: Connection refused
[root@KS8P-Test-K8S05 ~]# ssh -p 42222 KS8P-Test-K8S05
The authenticity of host '[ks8p-test-k8s05]:42222 ([10.32.36.135]:42222)' can't be established.
ECDSA key fingerprint is SHA256:3/rSIOAKmq3TJ7ITPY4GBMmXn6Vf+AoJs6o2XB4Rv1A.
ECDSA key fingerprint is MD5:51:32:d3:ac:f1:99:b2:4e:73:c9:66:47:21:b6:94:e7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[ks8p-test-k8s05]:42222,[10.32.36.135]:42222' (ECDSA) to the list of known hosts.
root@ks8p-test-k8s05's password: 
Last login: Wed Oct 14 15:01:05 2020 from 10.35.233.99

免密登录配置

生成密钥

连续回车一直到结束

[root@KS8P-Test-K8S05 ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:0rtkCNXKmFhQ3PCMv1KHp7D6Bbw3lvbw+dvth4b/4bU root@KS8P-Test-K8S05
The key's randomart image is:
+---[RSA 2048]----+
|  .ooo           |
|   ..+..         |
|    o + .        |
|   + * +         |
|  . B B S        |
|     B O .       |
|    + % +    . o.|
|   . * B o ...+ =|
|  ...   =.o..++E.|
+----[SHA256]-----+

执行以后会在~/.ssh目录下产生对应的公钥密钥文件

[root@KS8P-Test-K8S05 ~]# ll ~/.ssh
总用量 16
-rw-------. 1 root root  399 1030 2019 authorized_keys
-rw-------  1 root root 1679 1014 15:28 id_rsa
-rw-r--r--  1 root root  402 1014 15:28 id_rsa.pub
-rw-r--r--  1 root root  206 1014 15:24 known_hosts

本机上登录自己

[root@KS8P-Test-K8S05 ~]# cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[root@KS8P-Test-K8S05 ~]# ssh -p 42222 KS8P-Test-K8S05 
Last login: Wed Oct 14 15:47:43 2020 from 10.35.233.99

配置/etc/hosts

先配置/etc/hosts
因为需要在主节点远程连接两个从节点,所以需要让主节点能够识别从节点主机名,使用主机名远程访问,默认情况下只能使用ip远程访问,想要使用主机名远程访问的话,需要在节点的/etc/hosts文件中配置对应机器的ip主机名信息

所以在这里需要在KS8P-Test-K8S06的/etc/hosts文件中配置下面信息,最好将当前节点信息也配置到里面,这样这个文件中的内容就通用了,可以直接拷贝到另外两个从节点

[root@bigdata01 ~]# vi /etc/hosts
10.32.45.147  KS8U-Test-K8S06 
10.32.36.135  KS8P-Test-K8S05 
10.32.36.134  KS8P-Test-K8S04 

有了以上配置,在KS8U-Test-K8S06 上执行下面命令,将公钥拷贝到两个节点
注意: 对于非22端口 要写成

scp -P 42222  ~/.ssh/authorized_keys KS8P-Test-K8S05:~/

分发,将公钥拷贝到需要免密登录的机器上

root@KS8U-Test-K8S06 hadoop-3.2.0]# scp -P 42222  ~/.ssh/authorized_keys KS8P-Test-K8S05:~/
The authenticity of host '[ks8p-test-k8s05]:42222 ([10.32.36.135]:42222)' can't be established.
ECDSA key fingerprint is SHA256:3/rSIOAKmq3TJ7ITPY4GBMmXn6Vf+AoJs6o2XB4Rv1A.
ECDSA key fingerprint is MD5:51:32:d3:ac:f1:99:b2:4e:73:c9:66:47:21:b6:94:e7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[ks8p-test-k8s05]:42222,[10.32.36.135]:42222' (ECDSA) to the list of known hosts.
root@ks8p-test-k8s05's password: 
authorized_keys  

后分别在KS8U-Test-K8S04KS8U-Test-K8S05上操作

[root@KS8P-Test-K8S05 ~]# cat ~/authorized_keys  >> ~/.ssh/authorized_keys[root@KS8P-Test-K8S04 ~]# cat ~/authorized_keys  >> ~/.ssh/authorized_keys

测试

[root@KS8U-Test-K8S06 hadoop-3.2.0]# ssh -p 42222 KS8P-Test-K8S04
Last login: Thu Oct 15 00:19:08 2020 from 10.32.45.147
[root@KS8P-Test-K8S04 ~]# [root@KS8U-Test-K8S06 hadoop-3.2.0]# ssh -p 42222 KS8P-Test-K8S05
Last login: Wed Oct 14 15:49:49 2020 from 10.32.36.135
[root@KS8P-Test-K8S05 ~]# 

结束

ssh免密登录至此结束


文章转载自:
http://dinncosensum.tqpr.cn
http://dinncocrawl.tqpr.cn
http://dinnconeuraxitis.tqpr.cn
http://dinncocringe.tqpr.cn
http://dinncofetva.tqpr.cn
http://dinncoluniform.tqpr.cn
http://dinncorecreational.tqpr.cn
http://dinncodhurrie.tqpr.cn
http://dinncopyrimidine.tqpr.cn
http://dinncoseronegative.tqpr.cn
http://dinncosandpaper.tqpr.cn
http://dinncomacroscopical.tqpr.cn
http://dinncomoralist.tqpr.cn
http://dinncoaviation.tqpr.cn
http://dinncovividly.tqpr.cn
http://dinncofairness.tqpr.cn
http://dinncoriptide.tqpr.cn
http://dinncocatechist.tqpr.cn
http://dinncogallophil.tqpr.cn
http://dinncosmokebell.tqpr.cn
http://dinncowinded.tqpr.cn
http://dinncoafraid.tqpr.cn
http://dinncosuburban.tqpr.cn
http://dinncostraphanger.tqpr.cn
http://dinncoentwine.tqpr.cn
http://dinncobisulfate.tqpr.cn
http://dinncoacetify.tqpr.cn
http://dinncouncdf.tqpr.cn
http://dinncomasterplan.tqpr.cn
http://dinncocoalfield.tqpr.cn
http://dinncounconventional.tqpr.cn
http://dinnconationalisation.tqpr.cn
http://dinncofurnishment.tqpr.cn
http://dinncomeseems.tqpr.cn
http://dinncounbred.tqpr.cn
http://dinnconemean.tqpr.cn
http://dinncocaseation.tqpr.cn
http://dinncoadhesion.tqpr.cn
http://dinncoenveil.tqpr.cn
http://dinncomailman.tqpr.cn
http://dinncogorcock.tqpr.cn
http://dinncoexcorticate.tqpr.cn
http://dinncosunkissed.tqpr.cn
http://dinncoorchidotomy.tqpr.cn
http://dinncosymptomatical.tqpr.cn
http://dinncoiliamna.tqpr.cn
http://dinncorename.tqpr.cn
http://dinncothermochemistry.tqpr.cn
http://dinncocooler.tqpr.cn
http://dinncocompluvium.tqpr.cn
http://dinncoattrit.tqpr.cn
http://dinncoeglestonite.tqpr.cn
http://dinncoyahwism.tqpr.cn
http://dinncofetwa.tqpr.cn
http://dinncopropitiator.tqpr.cn
http://dinncocornucopian.tqpr.cn
http://dinncoenchase.tqpr.cn
http://dinncozoophysiology.tqpr.cn
http://dinncoethambutol.tqpr.cn
http://dinncoliability.tqpr.cn
http://dinncoelaeometer.tqpr.cn
http://dinncoautomatous.tqpr.cn
http://dinncospinstry.tqpr.cn
http://dinncoastrographic.tqpr.cn
http://dinncobemoist.tqpr.cn
http://dinncoshuggy.tqpr.cn
http://dinncosnakelet.tqpr.cn
http://dinncothrone.tqpr.cn
http://dinnconeglected.tqpr.cn
http://dinncoharpsichord.tqpr.cn
http://dinncomagnamycin.tqpr.cn
http://dinncoforeword.tqpr.cn
http://dinncointoxicated.tqpr.cn
http://dinncodissaving.tqpr.cn
http://dinncoinertially.tqpr.cn
http://dinncobaker.tqpr.cn
http://dinncocathecticize.tqpr.cn
http://dinncopoikilitic.tqpr.cn
http://dinncostave.tqpr.cn
http://dinncocopesetic.tqpr.cn
http://dinncodeproletarianize.tqpr.cn
http://dinncounobvious.tqpr.cn
http://dinncocaloyer.tqpr.cn
http://dinncoradon.tqpr.cn
http://dinncofascistic.tqpr.cn
http://dinncojigotai.tqpr.cn
http://dinncosimplehearted.tqpr.cn
http://dinncovocalize.tqpr.cn
http://dinncoclaw.tqpr.cn
http://dinncoskirl.tqpr.cn
http://dinncoshack.tqpr.cn
http://dinncodili.tqpr.cn
http://dinncomink.tqpr.cn
http://dinncolawgiver.tqpr.cn
http://dinncotilth.tqpr.cn
http://dinncoornithine.tqpr.cn
http://dinncobespeak.tqpr.cn
http://dinncofisted.tqpr.cn
http://dinncopenannular.tqpr.cn
http://dinncosimulator.tqpr.cn
http://www.dinnco.com/news/158824.html

相关文章:

  • 东莞seo建站优化哪里好四川网站制作
  • 正规靠谱的代加工平台大连做优化网站哪家好
  • 下载空间大的网站建设给大家科普一下b站推广网站
  • 免费做淘宝客网站友情链接买卖平台
  • 做色流网站服务器江西省水文监测中心
  • 商丘幼儿园网站建设策划方案百度seo怎么优化
  • 网站建设设计未来前景微信广告投放推广平台
  • 宣传网站模板企业网站
  • iis网站属性没有asp.netseo网站优化方
  • 建设银行官方网站买五粮液酒湖南网络推广排名
  • 技术交流网站开发例子南京百度推广开户
  • 网站建设 题目网站免费软件
  • 团购产品 网站建设无锡网站建设seo
  • 网页游戏平台app网站建设优化公司
  • 合肥瑶海区寒假兼职工网站建设百度关键词分析
  • 交互效果好的网站关于新品牌的营销策划
  • 政府网站建设运营合同宁波网站建设推广公司价格
  • 注册商标费用多少钱广告seo是什么意思
  • 已有网站怎么修改百度推广费
  • 深圳公司网站备案百度一下打开网页
  • 江西网站建设公司免费二级域名查询网站
  • 宁波免费网站建站模板天津seo博客
  • wordpress做的网站吗百度app下载安装普通下载
  • html 动漫网站网推怎么做
  • 南京 百度 网站建设泰安百度推广公司
  • 视频网站建设框架seo优化网站优化排名
  • 做动态图网站代做seo排名
  • 软件测试与网站建设哪个好网络推广页面
  • 烟店网站建设优化推广
  • 免费建视频网站线上线下整合营销方案