liximomo / vscode-sftp

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

[xxxx.sgedu.site]: Timed out while waiting for handshake #878

Open GusGF opened 3 years ago

GusGF commented 3 years ago

I'm trying to access my files on my site hosted by Siteground. I have successfully connected with Filezilla but having no luck with this extension in VSCode at all. It would be great to get this to work.

sftp.json:

{
    "name": "Siteground",
    "host": "xxxx.sgedu.site",
    "protocol": "sftp",
    "port": 21,
    "username": "wordpressdev02@xxxx.sgedu.site",
    "password": "xxxxxxxx",
    "remotePath": "/public_html",
    "uploadOnSave": true
}

VSCode Version: 1.52.1 (user setup) Windows 10 SFTP v1.12.9

I have set sftp.debug to true and reloaded vscode and the output I'm getting is

[02-01 04:14:37] [debug] Local ident: 'SSH-2.0-ssh2js0.4.5'
[02-01 04:14:37] [debug] Client: Trying xxxx.sgedu.site on port 21 ...
[02-01 04:14:38] [debug] Client: Connected
[02-01 04:14:48] [debug] Outgoing: Writing DISCONNECT (BY_APPLICATION)
GusGF commented 3 years ago

Just seen an earlier post about @bthompson90 maybe reviving this extension as the original creator is no longer active.

ghost commented 3 years ago

@GusGF I'll add this to the backlog.

GusGF commented 3 years ago

@noblecause appreciate that :)

arcaswebdesign commented 3 years ago

@GusGF we used Siteground for hosting too and have been able to get connected fine by uploading our public key to the server via their Cpanel then using config along these lines:

{ "name": "Arcas Server", "host": "35.214.10.224", "protocol": "sftp", "port": 18765, "username": "ourusername", "privateKeyPath": "/Users/myMacAccountName/.ssh/id_rsa", "passphrase": null, "remotePath": "/home/arcas***/public_html", "uploadOnSave": true }

Please note I've adjusted some info for privacy reasons. I'm using a Mac so the privateKeyPath might be different for you if you are on a PC but there are help docs on Siteground's site to guide you through the process of setting up a key initially then adding to their site.

GusGF commented 3 years ago

@arcaswebdesign Right so you only got it working by using a public key. I'll have to look in to that. Thanks for posting.

arcaswebdesign commented 3 years ago

@GusGF Yeah it was a bit of a faff to set up in the first place (adding the id_rsa file to my Mac) but I followed Siteground's guides and once I had my public key generated on my machine I simply added that to the SG server via their Cpanel and after that was able to connect.

GusGF commented 3 years ago

I assume if I try to connect using FTP as opposed to SFTP it's just ignored by Siteground servers. I haven't had to use it yet but will need it working pretty soon

Are these guides along the lines of what you used?

https://www.startnet.co.uk/how-to-ftp-with-notepad-and-siteground/ https://www.siteground.co.uk/kb/how_to_log_in_to_my_shared_account_via_ssh_in_mac_os/

arcaswebdesign commented 3 years ago

Yeah that second guide was along the lines of what I used (it was making cross-eyed to start with, to be honest!) so see how it goes and yeah use SFTP with the port number mentioned in my post if it's a Siteground server.

I found another guide elsewhere which helped me create my public/private key in the first place.

GusGF commented 3 years ago

Thank you. When I get around to it I'll let you know how I get on, hopefully this week. My hosting with SG is a free trial while I'm learning but if I can get it working it would be great. Thanks again