操作

安装扩展

remote-vscode

配置ssh 转发:
添加 RemoteForward 52698 127.0.0.1:52698 到 ~/.ssh/config:

# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
# Host localu1
#     HostName 128.196.126.142
#     User xxxx
#     IdentityFile ~/.ssh/id_rsa.pub

# Host textlalel
#     HostName 192.168.1.149
#     User xxxx
#     IdentityFile ~/.ssh/id_rsa.pub



Host myRemoteServerName
    HostName 12.34.567.89
    User root
    ForwardAgent yes
    RemoteForward 52698 127.0.0.1:52698

连接远程

ssh -v myRemoteServerName

在被控制端操作(已经登录):
安装rmate

wget -O /usr/local/bin/rcode https://raw.github.com/aurora/rmate/master/rmate &&chmod a+x /usr/local/bin/rcode

操作某个文件:

#重新登陆远程, 运行
rmate some_file.php

文件出现在vscode

其他方式

使用ssh:已经测试

https://blog.csdn.net/qq756684177/article/details/94236990
https://github.com/cdr/code-server/releases

相关文章:

  • 2021-10-24
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2021-08-24
  • 2021-05-13
  • 2021-08-17
  • 2021-12-19
猜你喜欢
  • 2021-11-06
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2021-07-07
相关资源
相似解决方案