为何要用跳板机

方便记录操作,仅允许内网访问,安全。

不便

多次输入密码,多次上传下载文件

解决

Windows

  1. 最佳方案:
    连接跳板机 使用plink -ssh -D选项或者putty中的ssh tunnel,先设置socks5代理,然后在putty或者WinSCP中指定刚才设置的proxy。
    WinSCP可以记住密码 在WinSCP中可以打开putty 自动使用用户名、密码、代理登录
    winscp支持命令行。
  2. 其它方案:
    WinSCP 支持设置SSH跳板机,解决上传下载
    leputty/extraputty 支持Z Modem,支持rz/sz 解决上传下载
    SecureCRT + expect + ssh + rz/sz 解决上传下载

Linux/Mac

使用ssh自带的ProxyCommand选项

http://superuser.com/questions/44106/is-there-a-way-to-auto-login-in-putty-with-a-password
http://stackoverflow.com/questions/6147203/automating-running-command-on-linux-from-windows-using-putty
http://superuser.com/questions/515601/how-to-run-a-command-file-in-putty-using-automatic-login-in-a-command-prompt
http://superuser.com/questions/96489/an-ssh-tunnel-via-multiple-hops
http://superuser.com/questions/303486/sftp-over-double-server-hop
http://serverfault.com/questions/37629/how-do-i-do-multihop-scp-transfers
http://askubuntu.com/questions/311447/how-do-i-ssh-to-machine-a-via-b-in-one-command
http://unix.stackexchange.com/questions/31071/shell-script-for-logging-into-a-ssh-server
http://unix.stackexchange.com/questions/38737/ssh-login-with-clear-text-password-as-a-parameter
http://unix.stackexchange.com/questions/31071/shell-script-for-logging-into-a-ssh-server
https://www.cyberciti.biz/faq/linux-unix-ssh-proxycommand-passing-through-one-host-gateway-server/