bash: ssh: command not found
执行 : yum -y install openssh-clients
ssh常用命令:
远程登录
ssh user@remote.machine
- 远程执行
ssh user@remote.machine 'command ...'
- 远程复制
scp user@remote.machine:/remote/path /local/path
scp /local/path user@remote.machine:/remote/path
- X forward
ssh -X user@remote.machine
xcommand ...
- Tunnel / Portforward
ssh -L 1234:remote.machine:4321 user@remote.machine
ssh -R 1234:local.machine:4321 user@remote.machine
ssh -L 1234:other.machine:4321 user@remote.machine
远程和本地之间切换
要临时回到本地主机,输入退出符号:“~”与“Control-Z”组合。
当你输入“~”你不会立即在屏幕上看到,当你按下<Control-Z>并且按回车之后才一起显示。如下,在远程主机中以此输入“~<Control-Z>”
在本地 jobs 可以查看远程链接
fg %1 返回到远程
ssh 连oracle