ssh 生成信任连接

1. ssh key

  cd ~/.ssh

如果有文件id_rsa.pub 或 id_dsa.pub 则不需要生成

  ssh-keygen -t rsa -C  "your_email@example.com"

2. 信任连接

  cat ~/.ssh/id_rsa.pub | ssh user@host -p port "cat - >> ~/.ssh/authorized_keys"

3. 连接

  ssh user@host -p port