Open kleingeo opened 5 months ago
+1
My debug output a little different saying Channel open failure: Name or service not known
[04-17 14:39:21] [error] Error: (SSH) Channel open failure: Name or service not known
at onChannelOpenFailure (/Users/username/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/utils.js:16:11)
at CHANNEL_OPEN_FAILURE (/Users/username/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/client.js:572:11)
at 92 (/Users/username/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/handlers.misc.js:881:16)
at Protocol.onPayload (/Users/username/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/Protocol.js:2052:10)
at AESGCMDecipherNative.decrypt (/Users/username/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/crypto.js:987:26)
at Protocol.parsePacket [as _parse] (/Users/username/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/Protocol.js:2021:25)
at Protocol.parse (/Users/username/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/Protocol.js:306:16)
at Socket.<anonymous> (/Users/username/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/client.js:775:21)
at Socket.emit (node:events:514:28)
at Socket.emit (node:domain:489:12)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Socket.push (node:internal/streams/readable:234:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
so after much testing and trying different settings. This does work, but you have to use the full domain in the hop (target) definition.
I have sites setup in my config locally and in the server that I'm hoping from and it doesn't work when using the name from the config file.
so after much testing and trying different settings. This does work, but you have to use the full domain in the hop (target) definition.
I have sites setup in my config locally and in the server that I'm hoping from and it doesn't work when using the name from the config file.
Can you link your setup config file you are using to get it working (even with dummy IP addresses). I am also using full addresses but I am still having trouble.
{
"name": "serverDev1",
"host": "office",
"protocol": "sftp",
"port": 22,
"username": "username",
"privateKeyPath": "/Users/username/.ssh/office_rsa",
"remotePath": "/shared/accounts/t/testingServer/dev1.example.com",
"hop": {
"host": "dev1.example.com",
"protocol": "sftp",
"port": 22,
"username": "username",
"privateKeyPath": "/storage/home/username/.ssh/dev1_rsa"
},
"downloadOnOpen": true,
"uploadOnSave": true,
"useTempFile": false,
"ignore": [
"/some/folder/with/ignored/files"
]
}
So our "office" server is where I'm hopping through and I have an entry in my .ssh/config
file that handles the connection from my computer to the office server.
In the hop definition is where I have to use a full domain on the host (even though I have a .ssh/config
on the office server to handle it. I also noticed that it needed the protocol
AND port
in the hop definition for it to connect to the final server.
Also, just in case, either password
or privateKeyPath
worked in my testing in the hop definition
Hopefully that helps.
I also noticed that it needed the
protocol
ANDport
in the hop definition for it to connect to the final server.
Yep, I didn't have protocol
in the hop
. That's what fixed it in the end.
Trying to setup connection hopping as a way to proxy jump. I'm on Win 11 and using the latest versions of the extension/VScode.
Error output
The connections are setup properly. I am able to ssh from local -> host_a and from host_a -> host_b easily. I can also do it in one step with local ssh config file, but not sure how to utilize that.