在一个命令行中通过两台服务器和一个用户 SSH

Phi*_*ayo 1 ssh

可能的重复:
如何使用 ssh 通过另一台电脑连接到一台电脑

如何在一个命令行中进行以下操作?

$ ssh 服务器一
$ su - 用户
$ ssh server-2

当然我不能直接 ssh user@server-two

rus*_*ush 6

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)