两台机器建立ssh信任链接,访问无须输入密码
来源:互联网 发布:佛山淘宝客服外包 编辑:程序博客网 时间:2024/05/18 02:13
First log in on A as user a and generate a pair of authentication keys. Do not enter a passphrase:
a@A:~> ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/a/.ssh/id_rsa): Created directory '/home/a/.ssh'.Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/a/.ssh/id_rsa.Your public key has been saved in /home/a/.ssh/id_rsa.pub.The key fingerprint is:3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A
Now use ssh to create a directory ~/.ssh as user b on B. (The directory may already exist, which is fine):
a@A:~> ssh b@B mkdir -p .sshb@B's password:
Finally append a's new public key to b@B:.ssh/authorized_keys and enter b's password one last time:
a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'b@B's password:
From now on you can log into B as b from A as a without password:
a@A:~> ssh b@B
A note from one of our readers: Depending on your version of SSH you might also have to do the following changes:
- Put the public key in .ssh/authorized_keys2
- Change the permissions of .ssh to 700
- Change the permissions of .ssh/authorized_keys2 to 640
0 0
- 两台机器建立ssh信任链接,访问无须输入密码
- 在两台服务器之间建立信任关系解决scp,ssh等不用输入密码等问题
- 在两台服务器之间建立信任关系解决scp,ssh等不用输入密码等问题
- 在两台服务器之间建立信任关系解决scp,ssh等不用输入密码等问题
- 两台linux机器建立信任
- 两台linux服务器之间建立ssh信任关系
- 两台linux服务器之间建立ssh信任关系
- 两台Linux主机如何建立ssh信任关系?
- linux 建立两台机器的信任关系
- linux 建立两台机器的信任关系
- 在两台linux机器之间建立信任关系
- 两台linux机器之间建立信任关系
- Shell建立网内任意两台机器信任关系
- ssh 建立信任关系后,仍需要输入密码
- ssh 建立信任关系后,仍需要输入密码
- linux打通两台机器的ssh功能(linux远程连接可以不输入密码)
- linux打通两台机器的ssh功能(linux远程连接可以不输入密码)
- linux打通两台机器的ssh功能(linux远程连接可以不输入密码)
- asp.net 读取Excel数据并将数据插入到数据库中
- 来自陈沙克日志的收藏
- 主流内存数据库对比
- STL,VTK 与ASC 格式的转化
- 大马盼落实飞行数据即时监控
- 两台机器建立ssh信任链接,访问无须输入密码
- java环境变量的配置
- C++学习笔记->面向对象的三个特性
- 关于代码复查的一些笨想法
- 《勇者斗恶龙 4 被引导的人们》再次突袭手游市场!
- Axis Client 调用asmx 错误No implementation defined for org.apache.commons.logging.LogFactory
- Jqury Ajax火狐浏览器返回的result是object XmlDocument 的问题
- PhpStorm配置SVN
- 画出千军万马!远古神兵听凭你的「指」挥