liximomo / vscode-sftp

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

Timeout and cannot log back in #916

Open stefanomonteiro opened 3 years ago

stefanomonteiro commented 3 years ago

Hi,

Thanks for this extension.

The only issue I am having is that it often times out, which is understandable. However, I have no warning that it did and worst of all. I cannot simply log back in. I need to quit VS code and open back again.

Is there anyway to avoid this, is any setting that I have wrong?

Thanks again.

ghost commented 3 years ago

You can run VScode command (Ctrl+Shift+P) Developer: Restart Extension Host so it would restart the extensions without quitting VScode.

Although, I noticed this timeout issue on all kinds of other ftp/ssh software. My work around is to use ssh config file (inside ~/.ssh/) and setup your host to keep alive like this:

Host any-name-you-want
    HostName ip.address.or.domain.name
    User remote_username
    IdentityFile C:\path\to\ssh_key
    ServerAliveInterval 10
    ServerAliveCountMax 1

And in your sftp.json have:

{
    "host": "any-name-you-want",
    ...
}

This always helped me to prevent these kind of timeouts.