liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 260 forks source link

(SSH) Channel open failure: Connection refused #653

Open brianc118 opened 4 years ago

brianc118 commented 4 years ago

Do you read the FAQ?

Describe the bug Trying to hop from local -> A -> B. Getting "Channel open failure: Connection refused"

To Reproduce Steps to reproduce the behavior:

  1. Go to sftp.json and edit to
    [
    {
        "name": "bunny",
        "protocol": "sftp",
        "host": "serverA",
        "username": "username",
        "remotePath": "somePath",
        "privateKeyPath": "privateKeyPathA",
        "hop": {
            "host": "serverB", 
            "username": "username",
            "privateKeyPath": "privateKeyPathB",
            "passphrase": true
        }
    }
    ]
  2. Run command SFTP: Sync Local -> Remote (or any other SFTP command sync/download/list command"
  3. See error

Expected behavior No errors. Files synced to remote.

Desktop (please complete the following information):

Extension Logs from Startup - required

sftpDebug.log

Hanson13 commented 4 years ago

Same problem

Hanson13 commented 4 years ago

I just solve it by adding "port" to the hop configuration like this: [ { "name": "bunny", "protocol": "sftp", "host": "serverA", "username": "username", "remotePath": "somePath", "privateKeyPath": "privateKeyPathA", "hop": { "host": "serverB", "username": "username", "port": "22" "privateKeyPath": "privateKeyPathB", "passphrase": true } } ]

bigornoo commented 3 years ago

Yes it works !! Thank you very much !