两台linux服务器建立无密码通道

服务器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 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:
  0b:4a:80:12:67:fd:48:f8:01:18:d8:3f:34:46:3f:6f root@java-test

2.服务器B:ssh-keygen -t rsa

3.服务器B:touch /root/.ssh/authorized_keys

4.A的/root/.ssh/id_rsa.pub的内容追加到B的/root/.ssh/authorized_keys

你可能感兴趣的:(linux,ssh)