文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>A机中SSH免密码登录B机

A机中SSH免密码登录B机

时间:2010-07-23  来源:superzgc

SSH免密码登录

例:A机登录B机

1.在A机中

#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

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:           

e8:8a:5e:ae:c7:13:45:d0:81:cd:3f:e6:1e:f8:88:5a [email protected]

执行完毕,会在/root/.ssh/下面生成id_rsa.pub

2.在B机中创建/root/.ssh/authorized_keys,将A机id_rsa.pub中的内容,拷贝到B机/root/.ssh/authorized_keys中

3.在B机中,将/etc/ssh/sshd_config中的PermitRootLogin yes开启。

4.B机中#service sshd restart
相关阅读 更多 +
排行榜 更多 +
宝石帝国免广告

宝石帝国免广告

冒险解谜 下载
熊出没森林勇式单机版

熊出没森林勇式单机版

休闲益智 下载
像素勇士向前冲游戏

像素勇士向前冲游戏

休闲益智 下载