2021-05-26

VS Code Remot-SSH连接实现服务器环境运行调测Python 和shell脚本

一、VS Code Remot-SSH 连接

1、安装Remot-SSH 插件

在VS Code页面做侧菜单扩展-》搜索remote -》找到安装Remote-SSH-》点击安装
在这里插入图片描述
安装完后点击左下角绿色><远程窗口
扩展-》搜索remote ->安装Remote-SSH:

安装完后点击左下角连接》选择Connect Current Window to Host Remote-SSH

添加主机:Add New SSH Host

输入 ssh root@IP

打开设置,

本地CMD生成私钥
将私钥拷贝到服务的.ssh/authorized_keys 文件中
实现免密码登录
[10:52:56.264] Log Level: 2
[10:52:56.271] remote-ssh@0.65.4
[10:52:56.271] win32 x64
[10:52:56.272] SSH Resolver called for “ssh-remote+192.168.1.100”, attempt 1
[10:52:56.272] “remote.SSH.useLocalServer”: false
[10:52:56.272] “remote.SSH.showLoginTerminal”: false
[10:52:56.273] “remote.SSH.remotePlatform”: {“cloud”:“linux”,“cloud112”:“linux”,“192.168.1.20”:“linux”}
[10:52:56.273] “remote.SSH.path”: undefined
[10:52:56.273] “remote.SSH.configFile”: undefined
[10:52:56.273] “remote.SSH.useFlock”: true
[10:52:56.273] “remote.SSH.lockfilesInTmp”: false
[10:52:56.274] “remote.SSH.localServerDownload”: auto
[10:52:56.274] “remote.SSH.remoteServerListenOnSocket”: false
[10:52:56.274] “remote.SSH.showLoginTerminal”: false
[10:52:56.274] “remote.SSH.defaultExtensions”: []
[10:52:56.274] “remote.SSH.loglevel”: 2
[10:52:56.274] SSH Resolver called for host: 192.168.1.100
[10:52:56.275] Setting up SSH remote “192.168.1.100”
[10:52:56.317] Using commit id “054a9295330880ed74ceaedda236253b4f39a335” and quality “stable” for server
[10:52:56.320] Install and start server if needed
[10:52:59.731] getPlatformForHost was canceled
[10:52:59.732] Resolver error: Error: Connecting was canceled
    at Function.Canceled (c:\Users\Digital.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:64837)
    at c:\Users\Digital.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:294430
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Object.t.withShowDetailsEvent (c:\Users\Digital.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:405329)
    at async Object.t.resolve (c:\Users\Digital.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:295639)
    at async c:\Users\Digital.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:127:110530
[10:52:59.738] ------
报错:Resolver error: Error: Connecting was canceled

解决:点击文件-》首选项-》设置打开设置窗口,点击右上角
在大括号内加入:
    “remote.SSH.remotePlatform”: {
        “连接名称”: “linux”,
    }

报错:VS Code 无法连接到远程扩展主机服务器 (错误: WebSocket close with status code 1006)

控制台:能连上服务器,服务器上有.vscode文件夹,channel 3: open failed: administratively prohibited: open failed

服务器执行脚本vscode-server Ignoring option h-remote-auto-shutdown: not supported for server

解决: vi /etc/ssh/sshd_config
将:AllowTcpForwarding yes #注释去掉,改成 yes
重启 sshd服务:systemctl restart sshd

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2021-03-26 20:54:33,596 - Model - INFO - Epoch 1 (1/200): 2021-03-26 20:57:40,380 - Model - INFO - Train Instance Accuracy: 0.571037 2021-03-26 20:58:16,623 - Model - INFO - Test Instance Accuracy: 0.718528, Class Accuracy: 0.627357 2021-03-26 20:58:16,623 - Model - INFO - Best Instance Accuracy: 0.718528, Class Accuracy: 0.627357 2021-03-26 20:58:16,623 - Model - INFO - Save model... 2021-03-26 20:58:16,623 - Model - INFO - Saving at log/classification/pointnet2_msg_normals/checkpoints/best_model.pth 2021-03-26 20:58:16,698 - Model - INFO - Epoch 2 (2/200): 2021-03-26 21:01:26,685 - Model - INFO - Train Instance Accuracy: 0.727947 2021-03-26 21:02:03,642 - Model - INFO - Test Instance Accuracy: 0.790858, Class Accuracy: 0.702316 2021-03-26 21:02:03,642 - Model - INFO - Best Instance Accuracy: 0.790858, Class Accuracy: 0.702316 2021-03-26 21:02:03,642 - Model - INFO - Save model... 2021-03-26 21:02:03,643 - Model - INFO - Saving at log/classification/pointnet2_msg_normals/checkpoints/best_model.pth 2021-03-26 21:02:03,746 - Model - INFO - Epoch 3 (3/200): 2021-03-26 21:05:15,349 - Model - INFO - Train Instance Accuracy: 0.781606 2021-03-26 21:05:51,538 - Model - INFO - Test Instance Accuracy: 0.803641, Class Accuracy: 0.738575 2021-03-26 21:05:51,538 - Model - INFO - Best Instance Accuracy: 0.803641, Class Accuracy: 0.738575 2021-03-26 21:05:51,539 - Model - INFO - Save model... 2021-03-26 21:05:51,539 - Model - INFO - Saving at log/classification/pointnet2_msg_normals/checkpoints/best_model.pth 我有类似于这样的一段txt文件,请你帮我写一段代码来可视化这些训练结果
02-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值