linux ssh无需密码,linux下 ssh 实现无需密码的远程登陆
主機(jī)A(OpenSUSE12.1):119.78.222.95
主機(jī)B (Fedora16): 202.122.25.36
1.主機(jī)A:生成秘鑰對(duì)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.將主機(jī)A上生成的秘鑰拷貝到主機(jī)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
成功
總結(jié)
以上是生活随笔為你收集整理的linux ssh无需密码,linux下 ssh 实现无需密码的远程登陆的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: linux c文件属性,【linux c
- 下一篇: linux下spi添加设备,Linux