1. 在目标服务器上运行ssh-keygen ,在~/.ssh目录下建立密钥对。
2. cat id_rsa.pub >> authorized_keys
3. 在APM中添加监视器。加密密钥中输入私钥的内容(cat id_rsa)
4. 对于有的版本的产品和ssh,需要添加以下内容到/etc/ssh/sshd_config中,然后重新启动sshd: sudo service ssd restart
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org