linux远程登录免password
来源:互联网 发布:淘宝卖家怎么修改中评 编辑:程序博客网 时间:2024/05/21 02:52
如果希望从ServerA免输入passwd ssh到ServerB,先在ServerA上执行:
ssh-keygen -t rsa
例如:连续回车即可
hanqf@localhost:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/hanqf/.ssh/id_rsa):
Created directory '/home/hanqf/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/hanqf/.ssh/id_rsa.
Your public key has been saved in /home/hanqf/.ssh/id_rsa.pub.
The key fingerprint is:
d5:5a:63:3d:e7:09:d9:34:d5:2b:55:b5:a8:d8:7d:b9 hanqf@localhost
结果会在当前用户的家目录下的.ssh目录下面生成两个文件id_rsa.pub和id_rsa
把id_rsa.pub拷贝到ServerB的用户目录下的.ssh目录下的authorized_keys文件中,
如果ServerB下还没有这个文件,可以执行下面这个命令。
scp id_rsa.pub ServerB:~/.ssh/authorized_keys
例如:
hanqf@localhost:scp id_rsa.pub develop@192.168.1.219:~/.ssh/authorized_keys
develop@192.168.1.219's password:
如果ServerB已经有了该文件,请执行下面的命令把SeverA的id_rsa.pub的内容添加到该文件中。
scp id_rsa.pub ServerB:~/.ssh/ServerA_rsa.pub
cat ServerA_rsa.pub >> authorized_keys
hanqf@localhost:scp id_rsa.pub develop@192.168.1.219:~/.ssh/192.168.1.219_rsa.pub
develop@192.168.1.219's password:
hanqf@localhost:ssh develop@192.168.1.219
develop@192.168.1.219's password:
develop@localhost: cat 192.168.1.219_rsa.pub >> authorized_keys
测试一下儿:
hanqf@localhost:ssh develop@192.168.1.219
Last login:Wed May 13 14:41:43 2009 from 192.168.0.66
develop@localhost:
如果想从ServerB无password登录到ServerA,请把上述过程反向操作一遍。
- linux远程登录免password
- Linux免密码远程登录
- linux远程登录ssh免密码
- linux远程登录ssh免密码
- linux远程登录ssh免密码
- SSH免密码远程登录Linux
- linux远程登录ssh免密码
- linux服务器之间免密码远程登录
- SSH免密码远程登录Linux
- SSH免密码远程登录Linux
- linux SSH免密码远程登录
- 免输入密码,自动登录远程linux服务器
- mac iTerm 远程连接linux免登录方法
- 关于linux系统ssh远程免密登录的问题
- [Linux] CentOS/Mac OS 免密ssh登录远程服务器
- SSH免密码远程登录
- ssh免密码远程登录
- linux免密码登录
- a programmer’s geometry
- 数字频率计
- 各种数据库驱动和URL地址信息
- Silverlight 3 Is Released To The Web
- Sql Server2005对t-sql的增强之排名函数
- linux远程登录免password
- 【WitchHat.cn】信息分级
- 想购物去淘宝123导购看看
- C#经典23个使用技巧
- 控件字体
- String与InputStream相互转换
- 双色球随机号生成程序
- List Control的刷新闪烁
- 分组数据后再MAX。。SQL怎么写