annidy / notes

0 stars 0 forks source link

ssh jump server #76

Open annidy opened 11 months ago

annidy commented 11 months ago

使用跳板机

# 下面两种都可以
ssh -J <jump server> <remote server>
ssh -o ProxyCommand="ssh -W %h:%p <jump server>" <remote server>

How To Use SSH ProxyJump and SSH ProxyCommand 如何通过命令/配置config file跳转


ssh常用参数

annidy commented 10 months ago

部分跳板机不支持端口转发,只能用伪终端登录

迂回方法 ssh -t <jump server> ssh <remote server>

文件传输用rsync

rsync -P -avz -e '/usr/bin/ssh <jump server> ssh' local_file <remote server>:remote_file