vscode-sshfs
vscode-sshfs copied to clipboard
Can't connect through hop
So I currently have my .ssh config set up like this:
Host jumpbox
MACs [email protected]
HostKeyAlgorithms ecdsa-sha2-nistp256
HostName [REDACTED (jumpbox ip)]
User [REDACTED]
Host vm1
RequestTTY force
HostKeyAlgorithms ecdsa-sha2-nistp256
HostName [REDACTED (vm1 ip)]
User [REDACTED]
ProxyCommand ssh.exe -W %h:%p jumpbox-dallas
so I can connect directly to vm1 using the command ssh vm1
on any terminal.
I'm trying to set up SSH FS to replicate that configuration but I'm having a hard time while doing it. I hope you can help me out :)
This is what I have now:
"sshfs.configs": [
{
"name": "vm1",
"host": "[REDACTED (vm1 ip)]",
"hop": "jumpbox",
"username": "[REDACTED]",
"password": "[REDACTED]",
"merge": true,
"sftpSudo": "apps"
},
{
"name": "jumpbox",
"host": "[REDACTED (jumpbox ip)]",
"username": "[REDACTED]",
"password": "[REDACTED]",
"merge": true,
"privateKeyPath": "[REDACTED]"
}
],
This issue would be easier to solve with debug logs, so please follow these steps:
- Add
DEBUG_SSH2
to thesshfs.flags
array in VS Code's User Settings (settings.json) e.g."sshfs.flags": ["DEBUG_SSH2"]
- See this issue for more information about adding flags
- If you already have a connection open, close it completely (or even reload the window)
- Go to
Output > SSH FS
and copy the log from there after replicating your bug - While it should censor passwords/passphrases, I recommend checking it for (other) sensitive data first.
(especially since
DEBUG_SSH2
activates some internal logging, which is less likely to be censored)
Thank you for your answer, I'm attaching the logs:
[INFO]
Created output channel for vscode-sshfs
When posting your logs somewhere, keep the following in mind:
- While the logging tries to censor your passwords/passphrases/..., double check!
Maybe you also want to censor out e.g. the hostname/IP you're connecting to.
- If you want to report an issue regarding authentication or something else that
seems to be more of an issue with the actual SSH2 connection, it might be handy
to reconnect with this added to your User Settings (settings.json) first:
"sshfs.flags": [ "DEBUG_SSH2" ],
This will (for new connections) also enable internal SSH2 logging.
[INFO] Calculated config flags: {"fs_notify_errors":[true,"Fix for issue #282"],"debug_ssh2":[null,"Global Settings"]}
[INFO] Extension activated, version 1.25.0, mode 1
[DEBUG] Running VS Code version 1.69.0 {
"node": "16.13.2",
"v8": "10.0.139.17-electron.0",
"uv": "1.42.0",
"zlib": "1.2.11",
"brotli": "1.0.9",
"ares": "1.18.1",
"modules": "103",
"nghttp2": "1.45.1",
"napi": "8",
"llhttp": "6.0.4",
"openssl": "1.1.1",
"cldr": "40.0",
"icu": "70.1",
"tz": "2021a3",
"unicode": "14.0",
"electron": "18.3.5",
"microsoft-build": "14185429"
}
[INFO] Loading configurations...
[DEBUG] Added configuration vm1 from [1]
[DEBUG] Added configuration jumpbox from [1]
[INFO] Found 2 configurations
[INFO] Command received to open a terminal for FileSystemConfig(vm1)
[INFO] [createConnection(vm1,config)] Creating a new connection for 'vm1'
[INFO] Calculating actual config
[DEBUG] Read private key from c:\Users\Esteban\.ssh\jumpbox
[DEBUG] Final configuration:
{
"name": "vm1",
"merge": true,
"hop": "jumpbox",
"privateKeyPath": "c:\\Users\\Esteban\\.ssh\\jumpbox",
"host": "REDACTED",
"root": "~",
"username": "username1",
"password": "<censored>",
"_location": 1,
"_locations": [
1
],
"_calculated": {
"name": "vm1",
"merge": true,
"hop": "jumpbox",
"privateKeyPath": "c:\\Users\\Esteban\\.ssh\\jumpbox",
"host": "REDACTED",
"root": "~",
"username": "username1",
"password": "<censored>",
"_location": 1,
"_locations": [
1
]
},
"port": 22,
"privateKey": "Buffer(2610)"
}
[INFO] [createSocket(vm1)] Creating socket
[DEBUG] [createSocket(vm1)] Hopping through jumpbox
[INFO] Calculating actual config
[DEBUG] Read private key from c:\Users\Esteban\.ssh\jumpbox
[DEBUG] Final configuration:
{
"name": "jumpbox",
"host": "REDACTED",
"username": "username1",
"password": "<censored>",
"merge": true,
"privateKeyPath": "c:\\Users\\Esteban\\.ssh\\jumpbox",
"_location": 1,
"_locations": [
1
],
"_calculated": {
"name": "jumpbox",
"host": "REDACTED",
"username": "username1",
"password": "<censored>",
"merge": true,
"privateKeyPath": "c:\\Users\\Esteban\\.ssh\\jumpbox",
"_location": 1,
"_locations": [
1
]
},
"port": 22,
"privateKey": "Buffer(2610)"
}
[INFO] [createSocket(jumpbox)] Creating socket
[DEBUG] [createSocket(jumpbox)] Connecting to REDACTED:22
[DEBUG] [ssh2(jumpbox)] Custom crypto binding not available
[DEBUG] [ssh2(jumpbox)] Local ident: 'SSH-2.0-ssh2js1.6.0'
[DEBUG] [ssh2(jumpbox)] Socket connected
[DEBUG] [ssh2(jumpbox)] Remote ident: 'SSH-2.0-OpenSSH_7.4'
[DEBUG] [ssh2(jumpbox)] Outbound: Sending KEXINIT
[DEBUG] [ssh2(jumpbox)] Inbound: Handshake in progress
[DEBUG] [ssh2(jumpbox)] Handshake: (local) KEX method: [email protected],curve25519-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group15-sha512,diffie-hellman-group16-sha512,diffie-hellman-group17-sha512,diffie-hellman-group18-sha512
[DEBUG] [ssh2(jumpbox)] Handshake: (remote) KEX method: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
[DEBUG] [ssh2(jumpbox)] Handshake: KEX algorithm: [email protected]
[DEBUG] [ssh2(jumpbox)] Handshake: (local) Host key format: ecdsa-sha2-nistp256
[DEBUG] [ssh2(jumpbox)] Handshake: (remote) Host key format: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
[DEBUG] [ssh2(jumpbox)] Handshake: Host key format: ecdsa-sha2-nistp256
[DEBUG] [ssh2(jumpbox)] Handshake: (local) C->S cipher: [email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected]
[DEBUG] [ssh2(jumpbox)] Handshake: (remote) C->S cipher: aes128-ctr,aes192-ctr,aes256-ctr
[DEBUG] [ssh2(jumpbox)] Handshake: C->S Cipher: aes128-ctr
[DEBUG] [ssh2(jumpbox)] Handshake: (local) S->C cipher: [email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected]
[DEBUG] [ssh2(jumpbox)] Handshake: (remote) S->C cipher: aes128-ctr,aes192-ctr,aes256-ctr
[DEBUG] [ssh2(jumpbox)] Handshake: S->C cipher: aes128-ctr
[DEBUG] [ssh2(jumpbox)] Handshake: (local) C->S MAC: [email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
[DEBUG] [ssh2(jumpbox)] Handshake: (remote) C->S MAC: [email protected],[email protected],[email protected],hmac-sha2-512,hmac-sha2-256,[email protected]
[DEBUG] [ssh2(jumpbox)] Handshake: C->S MAC: [email protected]
[DEBUG] [ssh2(jumpbox)] Handshake: (local) S->C MAC: [email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
[DEBUG] [ssh2(jumpbox)] Handshake: (remote) S->C MAC: [email protected],[email protected],[email protected],hmac-sha2-512,hmac-sha2-256,[email protected]
[DEBUG] [ssh2(jumpbox)] Handshake: S->C MAC: [email protected]
[DEBUG] [ssh2(jumpbox)] Handshake: (local) C->S compression: none,[email protected],zlib
[DEBUG] [ssh2(jumpbox)] Handshake: (remote) C->S compression: none,[email protected]
[DEBUG] [ssh2(jumpbox)] Handshake: C->S compression: none
[DEBUG] [ssh2(jumpbox)] Handshake: (local) S->C compression: none,[email protected],zlib
[DEBUG] [ssh2(jumpbox)] Handshake: (remote) S->C compression: none,[email protected]
[DEBUG] [ssh2(jumpbox)] Handshake: S->C compression: none
[DEBUG] [ssh2(jumpbox)] Outbound: Sending KEXECDH_INIT
[DEBUG] [ssh2(jumpbox)] Received DH Reply
[DEBUG] [ssh2(jumpbox)] Host accepted by default (no verification)
[DEBUG] [ssh2(jumpbox)] Host accepted (verified)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending NEWKEYS
[DEBUG] [ssh2(jumpbox)] Inbound: NEWKEYS
[DEBUG] [ssh2(jumpbox)] Verifying signature ...
[DEBUG] [ssh2(jumpbox)] Verified signature
[DEBUG] [ssh2(jumpbox)] Handshake completed
[DEBUG] [ssh2(jumpbox)] Outbound: Sending SERVICE_REQUEST (ssh-userauth)
[DEBUG] [ssh2(jumpbox)] Inbound: Received SERVICE_ACCEPT (ssh-userauth)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending USERAUTH_REQUEST (none)
[DEBUG] [ssh2(jumpbox)] Inbound: Received USERAUTH_BANNER
[DEBUG] [ssh2(jumpbox)] Inbound: Received USERAUTH_FAILURE (publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive)
[DEBUG] [ssh2(jumpbox)] Client: none auth failed
[DEBUG] [ssh2(jumpbox)] Outbound: Sending USERAUTH_REQUEST (password)
[DEBUG] [ssh2(jumpbox)] Inbound: Received USERAUTH_SUCCESS
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_OPEN (r:0, direct-tcpip)
[DEBUG] [ssh2(jumpbox)] Inbound: GLOBAL_REQUEST ([email protected])
[DEBUG] [ssh2(jumpbox)] Outbound: Sending GLOBAL_REQUEST ([email protected])
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_OPEN_CONFIRMATION (r:0, s:0)
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 21)
[DEBUG] [ssh2(vm1)] Custom crypto binding not available
[DEBUG] [ssh2(vm1)] Local ident: 'SSH-2.0-ssh2js1.6.0'
[DEBUG] [ssh2(vm1)] Socket connected
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 21)
[DEBUG] [ssh2(vm1)] Remote ident: 'SSH-2.0-OpenSSH_7.4'
[DEBUG] [ssh2(vm1)] Outbound: Sending KEXINIT
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 896)
[DEBUG] [ssh2(jumpbox)] Inbound: REQUEST_SUCCESS
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 1280)
[DEBUG] [ssh2(vm1)] Inbound: Handshake in progress
[DEBUG] [ssh2(vm1)] Handshake: (local) KEX method: [email protected],curve25519-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group15-sha512,diffie-hellman-group16-sha512,diffie-hellman-group17-sha512,diffie-hellman-group18-sha512
[DEBUG] [ssh2(vm1)] Handshake: (remote) KEX method: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
[DEBUG] [ssh2(vm1)] Handshake: KEX algorithm: [email protected]
[DEBUG] [ssh2(vm1)] Handshake: (local) Host key format: ecdsa-sha2-nistp256
[DEBUG] [ssh2(vm1)] Handshake: (remote) Host key format: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
[DEBUG] [ssh2(vm1)] Handshake: Host key format: ecdsa-sha2-nistp256
[DEBUG] [ssh2(vm1)] Handshake: (local) C->S cipher: [email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected]
[DEBUG] [ssh2(vm1)] Handshake: (remote) C->S cipher: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc
[DEBUG] [ssh2(vm1)] Handshake: C->S Cipher: [email protected]
[DEBUG] [ssh2(vm1)] Handshake: (local) S->C cipher: [email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected]
[DEBUG] [ssh2(vm1)] Handshake: (remote) S->C cipher: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc
[DEBUG] [ssh2(vm1)] Handshake: S->C cipher: [email protected]
[DEBUG] [ssh2(vm1)] Handshake: (local) C->S MAC: [email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
[DEBUG] [ssh2(vm1)] Handshake: (remote) C->S MAC: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
[DEBUG] [ssh2(vm1)] Handshake: C->S MAC: <implicit>
[DEBUG] [ssh2(vm1)] Handshake: (local) S->C MAC: [email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
[DEBUG] [ssh2(vm1)] Handshake: (remote) S->C MAC: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
[DEBUG] [ssh2(vm1)] Handshake: S->C MAC: <implicit>
[DEBUG] [ssh2(vm1)] Handshake: (local) C->S compression: none,[email protected],zlib
[DEBUG] [ssh2(vm1)] Handshake: (remote) C->S compression: none,[email protected]
[DEBUG] [ssh2(vm1)] Handshake: C->S compression: none
[DEBUG] [ssh2(vm1)] Handshake: (local) S->C compression: none,[email protected],zlib
[DEBUG] [ssh2(vm1)] Handshake: (remote) S->C compression: none,[email protected]
[DEBUG] [ssh2(vm1)] Handshake: S->C compression: none
[DEBUG] [ssh2(vm1)] Outbound: Sending KEXECDH_INIT
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 48)
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 280)
[DEBUG] [ssh2(vm1)] Received DH Reply
[DEBUG] [ssh2(vm1)] Host accepted by default (no verification)
[DEBUG] [ssh2(vm1)] Host accepted (verified)
[DEBUG] [ssh2(vm1)] Outbound: Sending NEWKEYS
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 16)
[DEBUG] [ssh2(vm1)] Inbound: NEWKEYS
[DEBUG] [ssh2(vm1)] Verifying signature ...
[DEBUG] [ssh2(vm1)] Verified signature
[DEBUG] [ssh2(vm1)] Handshake completed
[DEBUG] [ssh2(vm1)] Outbound: Sending SERVICE_REQUEST (ssh-userauth)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 4)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 32)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 16)
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 52)
[DEBUG] [ssh2(vm1)] Inbound: Received SERVICE_ACCEPT (ssh-userauth)
[DEBUG] [ssh2(vm1)] Outbound: Sending USERAUTH_REQUEST (none)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 4)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 48)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 16)
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 100)
[DEBUG] [ssh2(vm1)] Inbound: Received USERAUTH_FAILURE (publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive)
[DEBUG] [ssh2(vm1)] Client: none auth failed
[DEBUG] [ssh2(vm1)] Outbound: Sending USERAUTH_REQUEST (password)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 4)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 80)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 16)
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 36)
[DEBUG] [ssh2(vm1)] Inbound: Received USERAUTH_SUCCESS
[INFO] [createConnection(vm1,config)] Remote version: OpenSSH_7.4
[INFO] [createConnection(vm1,config)] Calculating shell config
[DEBUG] [createConnection(vm1,config)] Detected known $SHELL 'bash' (bash)
[DEBUG] [ssh2(vm1)] Outbound: Sending CHANNEL_OPEN (r:0, session)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 4)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 32)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 16)
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 500)
[DEBUG] [ssh2(vm1)] Inbound: GLOBAL_REQUEST ([email protected])
[DEBUG] [ssh2(vm1)] Outbound: Sending GLOBAL_REQUEST ([email protected])
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 4)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 496)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 16)
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 52)
[DEBUG] [ssh2(vm1)] Inbound: CHANNEL_OPEN_CONFIRMATION (r:0, s:0)
[DEBUG] [ssh2(vm1)] Outbound: Sending CHANNEL_REQUEST (r:0, exec: echo "::`echo 84440`:echo_result:`echo ~`:`echo 84440`::")
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 4)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 80)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 16)
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 500)
[DEBUG] [ssh2(vm1)] Inbound: REQUEST_SUCCESS
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 72)
[DEBUG] [ssh2(vm1)] Inbound: CHANNEL_WINDOW_ADJUST (r:0, 2097152)
[DEBUG] [ssh2(vm1)] Inbound: CHANNEL_SUCCESS (r:0)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending ping (GLOBAL_REQUEST: [email protected])
[DEBUG] [ssh2(jumpbox)] Inbound: Received REQUEST_FAILURE
[DEBUG] [ssh2(vm1)] Outbound: Sending ping (GLOBAL_REQUEST: [email protected])
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 4)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 32)
[DEBUG] [ssh2(jumpbox)] Outbound: Sending CHANNEL_DATA (r:0, 16)
[DEBUG] [ssh2(jumpbox)] Inbound: CHANNEL_DATA (r:0, 36)
[DEBUG] [ssh2(vm1)] Inbound: Received REQUEST_FAILURE