答案1
你的本地机器必须运行 ssh,然后你可以这样做
localusername@localmachine: ssh username@server -R 10000:localmachine:22
username@server: cd /var
username@server: sshfs -p 10000 -o idmap=user,nonempty \
[email protected]:~/mywwwdevelstuff www
答案2
我首先将scp
本地文件传输到远程服务器。
当然,在本地系统上安装 gvim 可能会更好。
答案3
您可以像这样在远程计算机上运行程序:
ssh -t <user>@<remote host> '<program to execute with full path and arguments>'
-t Force pseudo-terminal 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.