当前位置: 首页 > news >正文

香橙派3B学习笔记2:Vscode远程SSH登录香橙派_权限问题连接失败解决

Vscode下载插件,ssh远程登录香橙派。

ssh  : orangepi@本地ip
密码 : orangepi

 

安装 Remote - SSH 扩展SSH插件:

SSH远程连接:

ssh username@remote_host
ssh -p port_number username@remote_host

 默认22端口号就用第一行的格式就行了

我的就是默认22端口号,所以直接输入

ssh orangepi@192.168.2.104

更新配置点第一个就行

连接失败与解决:

但是连接一直失败:

 我的报错如下:

[11:28:12.030] Log Level: 2
[11:28:12.048] SSH Resolver called for "ssh-remote+192.168.2.104", attempt 1
[11:28:12.053] remote.SSH.useLocalServer = false
[11:28:12.053] remote.SSH.useExecServer = true
[11:28:12.053] remote.SSH.bindHost = {}
[11:28:12.053] remote.SSH.showLoginTerminal = false
[11:28:12.054] remote.SSH.remotePlatform = {}
[11:28:12.054] remote.SSH.path = 
[11:28:12.054] remote.SSH.configFile = 
[11:28:12.054] remote.SSH.useFlock = true
[11:28:12.054] remote.SSH.lockfilesInTmp = false
[11:28:12.054] remote.SSH.localServerDownload = auto
[11:28:12.054] remote.SSH.remoteServerListenOnSocket = false
[11:28:12.054] remote.SSH.defaultExtensions = []
[11:28:12.054] remote.SSH.defaultExtensionsIfInstalledLocally = []
[11:28:12.055] remote.SSH.loglevel = 2
[11:28:12.055] remote.SSH.enableDynamicForwarding = true
[11:28:12.055] remote.SSH.enableRemoteCommand = false
[11:28:12.056] remote.SSH.serverPickPortsFromRange = {}
[11:28:12.056] remote.SSH.serverInstallPath = {}
[11:28:12.057] remote.SSH.permitPtyAllocation = false
[11:28:12.057] remote.SSH.preferredLocalPortRange = undefined
[11:28:12.057] remote.SSH.useCurlAndWgetConfigurationFiles = false
[11:28:12.057] remote.SSH.experimental.chat = true
[11:28:12.057] remote.SSH.experimental.enhancedSessionLogs = true
[11:28:12.057] remote.SSH.httpProxy = {"*":""}
[11:28:12.058] remote.SSH.httpsProxy = {"*":""}
[11:28:12.064] VS Code version: 1.100.2
[11:28:12.064] Remote-SSH version: remote-ssh@0.120.0
[11:28:12.064] win32 x64
[11:28:12.067] SSH Resolver called for host: 192.168.2.104
[11:28:12.068] Setting up SSH remote "192.168.2.104"
[11:28:12.076] Using commit id "848b80aeb52026648a8ff9f7c45a9b0a80641e2e" and quality "stable" for server
[11:28:12.076] Extensions to install: 
[11:28:12.081] Install and start server if needed
[11:28:13.773] Checking ssh with "C:\ProgramData\Anaconda3\ssh.exe -V"
[11:28:13.775] Got error from ssh: spawn C:\ProgramData\Anaconda3\ssh.exe ENOENT
[11:28:13.775] Checking ssh with "C:\ProgramData\Anaconda3\Library\mingw-w64\bin\ssh.exe -V"
[11:28:13.777] Got error from ssh: spawn C:\ProgramData\Anaconda3\Library\mingw-w64\bin\ssh.exe ENOENT
[11:28:13.777] Checking ssh with "C:\ProgramData\Anaconda3\Library\usr\bin\ssh.exe -V"
[11:28:13.778] Got error from ssh: spawn C:\ProgramData\Anaconda3\Library\usr\bin\ssh.exe ENOENT
[11:28:13.778] Checking ssh with "C:\ProgramData\Anaconda3\Library\bin\ssh.exe -V"
[11:28:13.779] Got error from ssh: spawn C:\ProgramData\Anaconda3\Library\bin\ssh.exe ENOENT
[11:28:13.779] Checking ssh with "C:\ProgramData\Anaconda3\Scripts\ssh.exe -V"
[11:28:13.780] Got error from ssh: spawn C:\ProgramData\Anaconda3\Scripts\ssh.exe ENOENT
[11:28:13.780] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\ssh.exe -V"
[11:28:13.781] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\ssh.exe ENOENT
[11:28:13.781] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp\ssh.exe -V"
[11:28:13.782] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp\ssh.exe ENOENT
[11:28:13.782] Checking ssh with "C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\ssh.exe -V"
[11:28:13.783] Got error from ssh: spawn C:\Program Files\Common Files\Siemens\Automation\Simatic OAM\bin\ssh.exe ENOENT
[11:28:13.783] Checking ssh with "C:\ProgramData\Oracle\Java\javapath\ssh.exe -V"
[11:28:13.784] Got error from ssh: spawn C:\ProgramData\Oracle\Java\javapath\ssh.exe ENOENT
[11:28:13.784] Checking ssh with "C:\Windows\system32\ssh.exe -V"
[11:28:13.785] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT
[11:28:13.785] Checking ssh with "C:\Windows\ssh.exe -V"
[11:28:13.786] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT
[11:28:13.786] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V"
[11:28:13.787] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT
[11:28:13.787] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[11:28:13.788] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[11:28:13.788] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[11:28:13.822] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2[11:28:13.827] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 9217 "192.168.2.104" sh
[11:28:13.829] Generated SSH command: 'type "C:\Users\30313\AppData\Local\Temp\vscode-linux-multi-line-command-192.168.2.104-463329471.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 9217 "192.168.2.104" sh'
[11:28:13.830] Using connect timeout of 17 seconds
[11:28:13.831] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[11:28:14.126] > Bad permissions. Try removing permissions for user: \\Everyone (S-1-1-0) on file C:/Users/30313/.ssh/config.
> Bad owner or permissions on C:\\Users\\30313/.ssh/config
> 过程试图写入的管道不存在。
[11:28:14.126] Got some output, clearing connection timeout
[11:28:15.383] "install" terminal command done
[11:28:15.384] Install terminal quit with output: 过程试图写入的管道不存在。
[11:28:15.384] Received install output: 过程试图写入的管道不存在。
[11:28:15.384] WARN: $PLATFORM is undefined in installation script output.  Errors may be dropped.
[11:28:15.384] Failed to parse remote port from server output
[11:28:15.386] Resolver error: Error: at y.Create (c:\Users\30313\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:744751)at t.handleInstallOutput (c:\Users\30313\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:742832)at t.tryInstall (c:\Users\30313\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:865534)at async c:\Users\30313\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:824246at async t.withShowDetailsEvent (c:\Users\30313\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:827501)at async A (c:\Users\30313\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:820760)at async t.resolve (c:\Users\30313\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:824898)at async c:\Users\30313\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:1113660
[11:28:15.391] ------

 问了AI是提示我服务器拒绝所有人的访问权限,有个EVeryone用户的权限访问过于开放了,被拒绝了,这里导航到windows的ssh配置:

 右键config->属性,降低Everyone的权限,但我这里是直接删除了Everyone用户组,并应用才解决的。

成功登陆:

参考文章:

VS Code 远程连接 SSH 服务器_vscode连接ssh远程服务器-CSDN博客

相关文章:

  • 每日Prompt:梦回大唐
  • 阿斯利康医学代表在线测评笔试题库 | 3天备考、能力测评、性格测评历年真题 | 华东同舟求职讲求职
  • Day 30 训练
  • DOM事件的注册和移除
  • 基于大模型的髋关节骨关节炎预测与治疗方案研究报告
  • 题解:P12518 「MSTOI-R1」Easy question
  • Redis学习专题(五)缓存穿透、缓存击穿、缓存雪崩
  • PP-YOLOE-SOD学习笔记2
  • NV123NV134美光闪存颗粒NV139NV143
  • 【Elasticsearch入门到落地】13、DSL查询详解:分类、语法与实战场景
  • 模型参数详细介绍--AMP
  • NVMe高速传输之摆脱XDMA设计1
  • 第四十九节:图像分割-基于深度学习的图像分割
  • Next.js项目创建(chapter 1)
  • AMD硬件笔试面试题型解析
  • 详解最长公共子序列问题
  • MySQL 中表的约束 -- 空属性,默认值,主键,自增长,唯一键,外键
  • 湖北理元理律师事务所债务优化方案解析:如何科学规划还款保障生活质量
  • 虚幻基础:AI
  • PDF 转 JPG 图片小工具:CodeBuddy 助力解决转换痛点
  • 金华建设监理协会网站/高明搜索seo
  • 产品销售推广方案/seo搜索引擎优化总结报告
  • 创建简易个人网站/推广普通话的意义论文
  • 静态网站开发实训报告/昆明做网站的公司
  • 医院网站建设步骤/国内新闻大事20条
  • 常用网站推荐/今天微博热搜前十名