nauphone / ServerAccess

A tool to provide easy and seamless access to multiple servers via SSH
GNU General Public License v2.0
18 stars 3 forks source link

Fix FTP integration #35

Closed underoll closed 6 years ago

underoll commented 11 years ago

It'd be very cool to have a button "WinSCP" near the "FTP" one.

WinSCP can be opened with such command: WinSCP.exe sftp://login:password@host:port

apatrushev commented 11 years ago

Pass login and password to command line - it is not safe.

ahitrin commented 11 years ago

Since recent commits, you have the ability to use any FTP client you want (but only FTP). To achieve this, you need to define client launch string in your serveraccess.properties file. Something like this:

ftp=putty  {options}  -telnet  {host}  -P  {port}

Or

ftp=gftp  ftp://anonymous@{host}:{port}

See more examples in this file (there are no examples in documentation yet, blame my lazy ass).

Your login or password on the remote server cannot leak into FTP client because it's ServerAccess who only establishes secure connection to the server.

Please try this option with WinSCP and let me know whether you achieve success or not. Take into consideration that exactly two whitespaces are used to split application parameters. Things may not work when you use one whitespace instead of two (but you may have to use one whitespace inside a parameter; see examples again). If you want to see more info how your application is launched by ServerAccess, please set logging level to DEBUG in log4j.properties file and watch into the log file.

underoll commented 11 years ago

It seems to work:

ftp=winscp  ftp://anonymous@{host}:{port}

It is possible to send some files and folders to a remote host. BUT I can't see remote directories.

underoll commented 7 years ago

Well, I see that WinSCP is not very popular here But I noticed the same issue with nautilus (gvfs)

I tried

ftp=gvfs-mount  -a  ftp://{host}:{port}

and

ftp=nautilus  ftp://anonymous@{host}:{port}

I can upload some files but can't see remote files (just a blank window)

underoll commented 6 years ago

I made some experiments with different servers, clients and libs (for js). And it looks like most of ftp clients expect mtime formatted in GNU ls style like MMM DD HH:SS or MMM DD YYYY. I'm sure mtime formatting will fix the issue.

Relative code string: https://github.com/nauphone/ServerAccess/blob/cab7b44bc4f2f0d9a3f21acbc7c28ee1d6a539bb/src/main/java/ru/naumen/servacc/FTP2SFTPProxy.java#L415

ahitrin commented 6 years ago

Fixed here: https://github.com/nauphone/ServerAccess/commit/e66d9d64279b142505c70cb46883b4e4d24a787f

Feel free to reopen in case of similar issues.