The core problem is that your SFTP server requires SSH Key Authentication to properly permit connections. You mentioned with FileZilla, so I've written this answer as such.
For Filezilla, you can use this for non-password-protected SSH keys:
- Open the FileZilla client.
- From the top of the home screen, click on Edit and select Settings.
On the left side of the menu, expand the Connection section and highlight SFTP.
Click on the [Add keyfile...] button and browse your local machine's directories and select your Private Key file.
- Then, again from the top of FileZilla's home screen, click on File and select Site Manager.
Finally, on the left side of the Site Manager, click on the New Site button and type a unique name under My Sites that will allow you to easily identify this particular remote server in the future.
Now, under the General tab, fill in the Host (with either an IP address or FQDN) and Port fields (default is 22).
- In the Protocol dropdown menu, select SFTP - SSH File Transfer Protocol.
- In the Logon Type dropdown menu, select Interactive.
If your SSH key is password-protected then you'll need to use something else.
This said, there is usually a way to use SFTP in most GUIs. On Ubuntu 16.04, Nautilus has an "Connect to Server" button (there's a similar function in most of the other GUI file browsers) where you can specify sftp://user@remotelocation:22/path/on/server
and it should integrate with the ssh-agent
tool that is usually already running and indexing your keys. That should then just 'work' without having to do anything funny, and obeys the SFTP rules.
sftp
. If it works, the problem is Filezilla. (I think this is the case, and then you can use the file browser, if you want a GUI tool, for example Nautilus, Thunar or Pcmanfm depending on the flavour of Ubuntu). See the following link, askubuntu.com/questions/966229/…Permission denied (publickey). Couldn't read packet: Connection reset by peer
.sftp and ssh
work for me with very similar syntax also using key authentication. Please describe the ssh command line, that works for you.