linux ssh无需密码,linux下 ssh 实现无需密码的远程登陆
主机A(OpenSUSE12.1):119.78.222.95
主机B (Fedora16): 202.122.25.36
1.主机A:生成秘钥对id_rsa和id_rsa.pub
linux-9juc:~ # ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again: Enter
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:Enter
52:65:a0:7a:9a:42:55:a7:83:eb:d1:a0:f6:2a:e3:cf root@linux-9juc
The key's randomart p_w_picpath is:Enter
+--[ RSA 2048]----+
| . o.o |
| o + o |
| + + . |
| o = o |
| + + + S |
| o o = . |
| . = |
|o .o |
|.+oE |
+-----------------+
2.将主机A上生成的秘钥拷贝到主机B
linux-9juc:~/.ssh # ssh-copy-id -i id_rsa.pub root@202.122.25.36
3.重新登陆
linux-9juc:~/.ssh # ssh root@202.122.25.36
Last login: Mon Sep 16 13:18:57 2013 from 202.122.25.36
成功
总结
以上是生活随笔为你收集整理的linux ssh无需密码,linux下 ssh 实现无需密码的远程登陆的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: linux c文件属性,【linux c
- 下一篇: linux下spi添加设备,Linux