Public Scratchpad | Download, Select Code To D/L |
Here is a quick netcat replacement in Perl, for when you need to SSH through a hop host that does not have netcat but have a working Perl install:
In your `~/.ssh/config':
Host remote.example.net ProxyCommand ssh root@hop perl -MIO::Socket -e "'\$|=1;\$s=IO::Soc +ket::INET->new(shift);if(\$c=fork()){print while(read(\$s,\$_,1)>0);k +ill(2,\$c)}else{print{\$s}\$_ while(read(STDIN,\$_,1)>0)}'" %h:22