[root@ShadowFiend Gogo_yueyue]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: 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: 11:26:44:a9:14:f1:e3:75::0c:6c:91:7a:28:40 root@ShadowFiend The key's randomart image is: +--[ RSA 2048]----+ |.E .o**+o.... | |. + *=.o . | | . o B . | | . = . . | | .. S | | | | | | | | | +-----------------+ [root@ShadowFiend Gogo_yueyue]# ssh [email protected] "cat >>~/.ssh/authorized_keys" <~/.ssh/id_rsa.pub [email protected]'s password: [root@ShadowFiend Gogo_yueyue]# ssh [email protected] Last login: Sat Mar 3 14:55:19 2012 from 172.29.0.43 [root@fzo-501 ~]# vi ~/.ssh/known_hosts [root@fzo-501 ~]# vi ~/.ssh/authorized_keys [root@fzo-501 ~]# vi ~/.ssh/authorized_keys [root@fzo-501 ~]# exit logout
SSH无密码自动登录
猜你喜欢
转载自i-am-birdman.iteye.com/blog/1437611
今日推荐
周排行