可能的重复:
如何使用 ssh 通过另一台电脑连接到一台电脑
如何在一个命令行中进行以下操作?
$ ssh 服务器一 $ su - 用户 $ ssh server-2
当然我不能直接 ssh user@server-two
ssh server-one -t ssh user@localhost -t ssh server-two
Run Code Online (Sandbox Code Playgroud)
来自man ssh
:
-t Force pseudo-tty allocation. This can be
used to execute arbitrary screen-based programs
on a remote machine, which can be very useful,
e.g. when implementing menu services. Multiple -t
options force tty allocation, even if ssh has no local tty.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3775 次 |
最近记录: |