假设跳板机是10.194.41.69
远程登录10.27.26.13
cat ~/.ssh/config
Host jump
HostName 10.194.41.69
alias skvdcn="ssh tiger@10.27.26.13 -o proxycommand=\"ssh jump nc 10.27.26.13 22\""
远程scp
rscp(){
ip=""
for arg in $*
do
tmp=`echo "$arg" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"`
if [ ${#tmp} -gt 1 ]
then
ip=$tmp
break
fi
done
scp -o proxycommand="ssh jump nc $ip 22" $*
}