Secure SHellSSH 打通: ssh-keygen -t rsa cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys SSH代理: ssh -f -N <user name>@<ip or domain> -D <port> ssh -i ssh -i id_rsa // private key, the pub key >> authorized_keys [id_rsa的机器需要和目标机打通] mac 下自动打通工具: https://github.com/beautifulcode/ssh-copy-id-for-OSX mac下设置keepalive: ~/.ssh/config ServerAliveInterval 300 ServerAliveCountMax 36 ssh-otp: https://github.com/ziyan/ssh-otp 端口修改: 文件/etc/ssh/sshd_config,找到#Port 22修改为需要的端口。再生启服务: service sshd restart
参考资料[1]. http://en.wikipedia.org/wiki/Secure_Shell |