satiromarra / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
23 stars 3 forks source link

I'm trying to connect to the AWS server with regular FTP, but it just keeps trying and there is no error message. #63

Closed comonetso closed 1 year ago

comonetso commented 1 year ago

The configuration file looks like this

{ "name": "Food", "host": "xxxxxxx", "protocol": "ftp", "port": 21, "username": "xxxx", "password": "xxxxxx", "remotePath": "/docs", "uploadOnSave": False, "useTempFile": False, "openSsh": False, "ignore": [], "charset": "utf8", "showHidden": True, "secure": False, "profiles": {} }

In the terminal, the above configuration should work fine. The good connection in the terminal means that there is no problem connecting to this FTP server from your computer to the AWS server.

Also, with the above configuration, other hosts other than AWS will be connected well. So it looks like the configuration is fine.

However, when I try to connect to AWS with the above configuration, it keeps trying to connect and keeps trying even after the timeout, and there is no error message.

I wonder if the SFTP is going through another server.

I only have port 21 on my current machine open in the security group of ASW. I've been struggling with this for a few days now.

Please help me

satiromarra commented 1 year ago

@comonetsoHave you tried these options?:

"port": 21,
"secure": true,
comonetso commented 1 year ago

secure: true

If set as above, the

Unable to secure connection(s) it comes out like this

Otherwise, an infinite number of connection attempts will be made. No timeout

my sftp.json is

[ { "name": "Food", "host": "13.124.251.204", "protocol": "ftp", "uploadOnSave": true, "useTempFile": true, "port": 21, "username": "**", "ignore": [ ], "context": "./", "remotePath": "~/", "watcher": {}, "remoteExplorer": {"filesExclude": []}, "password": "*****", "charset": "ascii", "showHidden": false, "profiles": {} } ]

satiromarra commented 1 year ago

I had understood that you wanted to use ftps. To use "ftp", have you tried this configuration?

{
  "name": "Food",
  "host": "xxxxxxx",
  "protocol": "ftp",
  "port": 21, 
  "username": "xxxx",
  "password": "xxxxxx",
  "remotePath": "/docs",
  "charset": "utf8",
  "showHidden": true,
}
comonetso commented 1 year ago

I had understood that you wanted to use ftps. To use "ftp", have you tried this configuration?

{
  "name": "Food",
  "host": "xxxxxxx",
  "protocol": "ftp",
  "port": 21, 
  "username": "xxxx",
  "password": "xxxxxx",
  "remotePath": "/docs",
  "charset": "utf8",
  "showHidden": true,
}

Thanks for the answer.

I tried the settings you suggested.

Same thing, infinite connections, no errors, frustrating,

comonetso commented 1 year ago

It would be even worse if there was an error message, but since it only tries to connect infinitely, there is no error message.

satiromarra commented 1 year ago

and this? if your server is vsftpd: https://github.com/satiromarra/vscode-sftp/wiki/FAQ#error-session-reuse-required

{
  "name": "xxx",
  "password": "xxx",
  "username": "xxx",
  "host": "xxx",
  "protocol": "ftp",// <- this
  "port": 21,// <- this
  "secure": true, // <- this
  "secureOptions":  {"rejectUnauthorized": false, "secureProtocol" :"TLSv1_2_method"} // <- and this
}
comonetso commented 1 year ago

If you still get Unable to secure connection(s) error when I set secure to true, but when I change it to false, it's an infinite connection and the

satiromarra commented 1 year ago

Is the authentication with username/password or with rsa key?

comonetso commented 1 year ago

I didn't open the data transfer port for VSFTP in AWS

Port 21 is needed for sending commands, and there is a separate data transfer port.

Thank you.