SFTP clients should not rely on ssh commands
Describe the bug
When you create a new connection and leave the path empty the default value is ~ and this result in sending an ssh exec command to the SFTP server. An SFTP server could disable exec at all and so the app hangs and don't return the list of files.
I think the code that produces this behaviour is this (not tested):
https://github.com/niklas-8/RemoteFiles/blob/master/lib/services/connection_methods.dart#L87
To Reproduce Steps to reproduce the behavior:
- Download and start sftpgo (https://github.com/drakkan/sftpgo). You have the same problem with any SFTP only server
- Create an user a try to login
- The file list hangs if you don't set a path in the connection page
Expected behavior An SFTP client should not rely on ssh command but only on SFTP commands. I suggest to get the current directory using the SFTP command if no path is given
I added a workaround in sftpgo
https://github.com/drakkan/sftpgo/commit/9c4dbbc3f84caecb75331ac813ad4d71f6280325