在 Midnight Commander 中,可以使用以下方法与远程机器建立 SFTP 连接:
cd #sh:yourusername@example.com:/home/username/
Run Code Online (Sandbox Code Playgroud)
当远程机器使用非标准端口时,如何做到这一点?
Gil*_*il' 14
每当您想对 ssh 使用非默认设置时,请在~/.ssh/config
. 通过这种方式,您可以调用ssh myalias
,或者ssh myalias
在后台调用一些应用程序,而不必担心如何传递设置,例如非默认端口、不同的用户名等。
Host foo
HostName example.com
Port 2222
User yourusername
Run Code Online (Sandbox Code Playgroud)
然后在午夜指挥官: cd #sh:foo:
我意识到我已经尝试过该解决方案,但它没有用,因为我没有sshd
监听我正在使用的 VPN 接口。我现在已经在标准端口上监听了内部接口,所以我什至不再需要这个解决方案,但这里是:
cd #sh:yourusername@example.com:[port]/home/username/
Run Code Online (Sandbox Code Playgroud)