Sftp access problem

Hi,

I am new here and have scanned through the ftp related issues so far - but did not find a solution yet, if I have miseducating one, please let me know and I will be quiet :wink:

I have recently installed Atom Editor for writing yams files for my Home Assistant implementation on a Raspberry PI.
I am running Atom 1.38.1 on a macOS 10.14.4 and so far I have used Atom Commander 0.12.0 and remote-ftp 2.2.2, as well as remote-edit1.9.0
All of these connect to the remote host but none of these shows the content of the host :frowning:

However, when I use e.g. Forklift, it easily connects and also shows the content of the host …

I am not an (yet, working on it :wink: ) but obviously there is a mistake I must make, but I have tried different options, reinstalled, sftp and ftp but it is all the same …

Any help for a rookie is highly appreciated!

Cheers

Sven

Are you able to use an SSH client to connect to your Pi through the Terminal? SFTP uses SSH as its protocol, so the address and authentication credentials you use will be the same. Being on a *nix system, you probably have ssh built in, but I haven’t used Mac in ages, so I can’t verify.

You should also share a screenshot of the configuration and results you get with the packages. I use atom-commander, so I’ll feel most comfortable troubleshooting that one.

This shouldn’t be a permissions issue, but it could be a case of the Atom packages not requesting the correct folder, so you end up trying to view a sector of the Pi that you don’t have permission to touch. If you haven’t already, try explicitly declaring that you want to view the user folder of the account you’re logging in with, like so:

1 Like

Hi @DamnedScholar,

thanks for looking into this!

  • I can easily ssh via the terminal into both Pi’s I am trying using - I can see all folders and list them, modify files, etc. - not only true for my user folder but many other
  • using ~ doesn’t help anything for the better, I am afraid.
  • a screen shoot attached - showing the configuration of atom-commander for a server, it looks to me as if they are connected as I am not getting an error message from Atom-Commander. However, it keeps on loading (see bottom eft of the “Edit Server” screen.
  • (I am a new user here, so I can add only one screen shoot - will add another one to another spot, if I can)

Shouldn’t I be using the IP address - but if not, what else to be used?

Thanks a lot!

Sven

Here is the other screenshoot showing the Atom Commander screen

Do you have SSH access to any other servers that you could test? I don’t have a Pi handy to try, but I can SFTP in atom-commander to Linux servers I have access to on the Internet. So the latest version of the package still works like it’s supposed to. Maybe there’s something special about the Pi connection, or maybe the x-factor is sitting between Atom and your computer’s network. Something else to test would be if you can use ssh from a terminal inside Atom, such as termination. If that works, then the culprits are limited to the packages. It’s unlikely that they’ve all broken in the same way, but they all use the ssh2 module and it’s possible that something about your computer, or about the daemon running on the Pi, is disagreeing with ssh2. I’m definitely not knowledgeable enough to figure out what or why, but it’s conceivable that a community-developed pure JavaScript implementation of the SSH protocol might not be able to handle an edge case that the core application ssh can, and one little hookup is preventing the file list from loading.

Yes, I can easily ssh into my synology server with sftp - no problem whatsoever :wink:
Also, I have installed termination and it works fine on both PIs I have running …

I have tried meanwhile to sftp into the pi via Atom-Commander and that seems to have problems with the passphrase and the private key - thought I have checked the passphrase numerous times and it is correct!
However, I am getting following trace of error messages:

Error: Cannot parse privateKey: OpenSSH key integrity check failed – bad passphrase?
at Client.connect (/Users/svenschuldt/.atom/packages/atom-commander/node_modules/ssh2/lib/client.js:242:13)
at SFTPSession.module.exports.SFTPSession.connectWith (/Users/svenschuldt/.atom/packages/atom-commander/lib/fs/ftp/sftp-session.coffee:140:11)
at SFTPSession.module.exports.SFTPSession.connect (/Users/svenschuldt/.atom/packages/atom-commander/lib/fs/ftp/sftp-session.coffee:46:8)
at SFTPFileSystem.module.exports.SFTPFileSystem.connectImpl (/Users/svenschuldt/.atom/packages/atom-commander/lib/fs/ftp/sftp-filesystem.coffee:38:14)
at SFTPFileSystem.module.exports.VFileSystem.connect (/Users/svenschuldt/.atom/packages/atom-commander/lib/fs/vfilesystem.coffee:90:8)
at SFTPDialog.module.exports.SFTPDialog.test (/Users/svenschuldt/.atom/packages/atom-commander/lib/dialogs/sftp-dialog.coffee:399:8)
at HTMLButtonElement. (/Users/svenschuldt/.atom/packages/remote-ftp/node_modules/space-pen/lib/space-pen.js:220:36)
at HTMLButtonElement.dispatch (/Users/svenschuldt/.atom/packages/remote-ftp/node_modules/jquery/dist/jquery.js:4435:9)
at HTMLButtonElement.elemData.handle (/Users/svenschuldt/.atom/packages/remote-ftp/node_modules/jquery/dist/jquery.js:4121:28)

with this pretty screen :wink:

03

After searching a bit more around I found the solution:

as I have stated before I am using macOS 10.14.4. and that OS seems to generate a ssh-key in the OpenSSH format, however, that does not seem to work with Atom Commander, nor remote-ftp.
So I had to convert the key using the PEM format:

ssh-keygen -p -m PEM -f ~/.ssh/id_rsa

that works now, it can access the server and also save to it.
@DamnedScholar, your hint to ssh2 helped a lot, thanks!

The only funny thing left now, is that when I save a file to the server it saves fine, but I receive an error message, saying that the credentials for the server are incorrect - but it saves the edited file :thinking:
29

1 Like

Weird stuff. Glad you found an answer.