香橙派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:824246
	at 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博客

相关推荐
HyperAI超神经4 小时前
在线教程丨 David Baker 团队开源 RFdiffusion3,实现全原子蛋白质设计的生成式突破
人工智能·深度学习·学习·机器学习·ai·cpu·gpu
li星野6 小时前
打工人日报#20251231
笔记
孙严Pay6 小时前
分享三种不同的支付体验,各自有着不同的特点与适用场景。
笔记·科技·计算机网络·其他·微信
YJlio7 小时前
VolumeID 学习笔记(13.10):卷序列号修改与资产标识管理实战
windows·笔记·学习
weixin_440730507 小时前
java数组整理笔记
java·开发语言·笔记
小龙7 小时前
【学习笔记】多标签交叉熵损失的原理
笔记·学习·多标签交叉熵损失
知识分享小能手8 小时前
Ubuntu入门学习教程,从入门到精通,Ubuntu 22.04的Linux网络配置(14)
linux·学习·ubuntu
手揽回忆怎么睡8 小时前
Streamlit学习实战教程级,一个交互式的机器学习实验平台!
人工智能·学习·机器学习
xiaoxiaoxiaolll8 小时前
《Advanced Materials》基于MXene的复合纤维实现智能纺织品多模态功能集成
学习
db_murphy9 小时前
学习篇 | 英方i2Active和i2Stream工具了解
学习