Original topic:

Unable to remotely connect to SFTP Server through My Files

(Topic created on: 01-26-2022 04:27 PM)
4514 Views
jlarizza
Beginner Level 2
Options
Galaxy S

I have a home NAS and while I can connect to it while I'm on my network, the whole point of it is so that I can access my files when I'm not at home. After setting up SSH Keys, I am able to connect via SSH to an SFTP Server completely fine on my PC, and even while using a 3rd party app on my phone (Termius). But when I attempt to connect with the Samsung "My Files" app, I just get the message "Can't connect. Make sure the address and other info is correct, then try again."

I guarantee that the information entered is correct, especially because, like I said, I can connect with Termius with that exact same information. There's no reason why this shouldn't be working, and it's honestly laughable that a 3rd party app has this basic functionality that Samsung is lacking. So is there something I'm possibly missing by chance, or is the Samsung app just garbage?

8 Comments
Georgine
Moderator
Moderator
Options
Galaxy S

Hi, Welcome to the Samsung Members Community Canada. Back up the data in My Files then perform clear cache, data for my Files then check if the app is also updated with the latest version.

From Settings, swipe to and tap Apps. Select the app you want to clear. Tap Storage, and then tap Clear cache.

0 Likes
ModProg
Beginner Level 3
Galaxy S

I have the same problem, Password works... ssh-key does not.

I tried @Georgine's recommendation, but that did not help.

0 Likes
castleberrysam
Beginner Level 2
Galaxy S

Hi all,

I had this same problem, it seems that the app expects the key to be in PEM rather than OpenSSL format. You can convert via this command (overwrites the input file):

ssh-keygen -p -f <keyfile> -m PEM

After doing this the SFTP client seems to work correctly for me. @Georgine if you can request support for OpenSSL format keys, or at least a more descriptive error message, that would be great. Thanks!

saguado
Beginner Level 4
Galaxy S

Thanks! That works for me.

Too bad there is no information about this feature of the app.

0 Likes
Nikita_D
Beginner Level 4
Galaxy S

It worked for me... almost. I was so happy finally getting the keygen converted (had to struggle with ACL on remote server where both NAS and SSH run) just to be even more disappointed having the same result in the end - key is rejected, whatever I tried (different file extensions - .pem and empty one, ssh-keygen or puttygen, empty passphraze and a complex one) thou password authentification works fine. Strangely enough, it seems like it needs zero time for Samsung Files to reject connection. I fear the problem is totally on Samsung client side.

0 Likes
nopsqi
Beginner Level 2
Galaxy S

oepnssh version: 9.0p1-1

my files version: 13.1.02.362

 

i can't use pem rsa, it give me this message:

Oct 01 22:21:04 ThinkPad-X250 sshd[2963020]: userauth_pubkey: signature algorithm ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]
Oct 01 22:21:04 ThinkPad-X250 sshd[2963020]: error: Received disconnect from 192.168.1.10 port 58814:3: com.jcraft.jsch.JSchException: Auth fail [preauth]

 

after some searching i found this https://access.redhat.com/discussions/5251241. and i can connect to my ssh server using ecdsa pem

0 Likes
toomas
Beginner Level 2
Galaxy S

Now there's a new hiccup:

userauth_pubkey: signature algorithm ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]

Meaning SHA-1 is not accepted by default by newer SSH servers. I've tried elliptic curves, but the MyFiles app fails instantly. This happens on the phone side, as I do not see anything in sshd logs.

No informative error message.

Zero information as to what algorithms are supported from the app side.

If you try to check configuration, the private key field (it's just a file name) is always blank, so the user is left wondering, what would happen when he closes the menu. Will configuration be lost? Preserved?

0 Likes
FSamina
Beginner Level 2
Galaxy S

I has able to use SFTP:

RSA Key in PEM Format (with Passphrase)
ssh-key gen -t rsa -m PEM

But I had to add the RSA to the allowed Algorithms:
https://unix.stackexchange.com/questions/674582/how-to-enable-ssh-rsa-in-sshd-of-openssh-8-8

0 Likes