linux 之间设置无密码登录
来源:互联网 发布:嵌套sql语句执行顺序 编辑:程序博客网 时间:2024/06/05 08:09
A ssh B主机
A主机无密码登录B主机,假设B主机ip为:173.192.41.2
在A主机下面执行
cd ~ssh-keygen -d
一路回车,执行输出如下
Generating public/private dsa key pair.Enter file in which to save the key (/home/TSP/.ssh/id_dsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/TSP/.ssh/id_dsa.Your public key has been saved in /home/TSP/.ssh/id_dsa.pub.The key fingerprint is:61:23:a4:22:8c:af:37:d9:9d:c8:c5:6e:e6:54:eb:a5 TSP@tsp-rls-webservice01The key's randomart image is:+--[ DSA 1024]----+| . ||o o ||o.. . . + || o . . o o || . o S || . + = o . ||. + + B . . || . . = . o || . E |+-----------------+
ls ~/.ssh
id_dsa id_dsa.pub
sh-copy-id -i ~/.ssh/id_dsa.pub 173.192.41.2
The authenticity of host '192.168.30.202 (192.168.30.202)' can't be established.RSA key fingerprint is 69:f8:f9:5a:3a:c7:7e:f2:ad:f3:85:79:43:41:99:3d.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added '192.168.30.202' (RSA) to the list of known hosts.TSP@192.168.30.202's password:Now try logging into the machine, with "ssh '192.168.30.202'", and check in: .ssh/authorized_keysto make sure we haven't added extra keys that you weren't expecting.
注意:中间过程,需要输入服务端的用户密码
根据上述提示,在客户端使用ssh命令登陆服务端:
如果找不到命令,可以通过scp
scp id_dsa.pub 67.198.146.226:~/.ssh/authorized_keys
ssh 173.192.41.2
执行后可以无密码登录到远程linux
0 0
- linux 之间设置无密码登录
- 设置centos7之间ssh无密码登录
- linux下设置ssh无密码登录
- linux下设置ssh无密码登录
- linux下设置ssh无密码登录
- linux下设置ssh无密码登录
- linux下设置ssh无密码登录
- linux下设置ssh无密码登录
- linux下设置ssh无密码登录
- 如何设置集群的各个节点之间无密码登录.
- linux SSH无密码登录设置 仍需输密码
- linux无密码登录
- linux无密码登录
- Linux 无密码登录
- linux如何设置无密码登录mysql(如何设置无密码登陆mysql)
- SSH无密码登录设置
- GitHub设置无密码登录
- 设置ssh无密码登录
- spring工具类AntPathMatcher
- 低版本textView.setAlpha 报错java.lang.NoSuchMethodError: widget.TextView.setAlpha
- Android 触摸及手势操作GestureDetector
- rabbitmq 常用命令
- Haskell的newtype研究
- linux 之间设置无密码登录
- vs2010 问题 >LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- 手机APP测试流程&方法
- Android res/raw文件 读取文件
- CCNP-BGP基本配置 理解IBGP和EBGP 学会IBGP全互联 学会用环回口建立EBGP邻居
- CCNP-冗余链路中的广播风暴、多帧复制、地址表的不稳定
- CCNP-GNS3中telnet、ssh和https的详细配置步骤和测试
- OKHttp源码解析
- CCNP-帧中继在ospf中的应用-P2P-P2MP-Virlink虚链路解决不连续区域