2013年6月19日 星期三

[ssh] ProxyCommand - Run a local command before ssh to remote server.

Modify ~/.ssh/config
Host mydomain
    ProxyCommand sh -c "local_command /usr/bin/nc %h %p"

Host mydomain
    Hostname=mokoversity.com
    IdentityFile=~/.ssh/mokoversity_dsa
    User=hank
    PasswordAuthentication=no
    PubkeyAuthentication=yes
Related Posts Plugin for WordPress, Blogger...