Original topic:

My Files Network Storage - SFTP Server - Can't connect

(Topic created on: 07-16-2023 01:20 PM)
1294 Views
heaveless
Beginner Level 2
Options
Galaxy S

I am trying to connect to my FTP server using the "SFTP Server" option provided by the application.

I add all the required data and an RSA private key for authentication but it does not allow me.

My server has as authentication:
- RSA key - Passphrase
- 2FA
- Password

In theory, when putting the "Passphrase" I should skip an input to be able to add my "2FA" and after that the "password", but it simply says "Can't connect. ...".

I already looked for answers everywhere and many have the same problem since 2022, so in any case if it is not functional you should remove this option or repair those errors.

Initially I thought the problem was me, but I tried "Termux" and "Termius", they all work correctly.

Later I tried with the key transformed to PEM, but it keeps giving the same error.

Sometimes I wish these things were free on github so I could fix them myself and not wait so long.

I called support to help me with remote assistance, but they just told me to reset everything and try again and if it keeps giving that problem, then the problem is my data. :v

4 Comments
heaveless
Beginner Level 2
Galaxy S

I was experimenting for many hours on how to solve this problem, and I got to the solution and I could understand the reason why they built it this way. And I realized that it is not versatile for different types of authentication. So I can understand the devs who did this, but it lacks improvements, so I'm more or less satisfied, since it forced me to lower the security level of my server and break layers. So I will have to find a way to solve that need or some other alternative.
Note: 

If you have security layers such as Google authenticator or others, it is better that you disable it and only keep the private keys or, failing that, the password type.

Since if there are more layers, it will simply tell you that it cannot be accessed without any other extra information.

It is important that your keys are generated as "ECDSA PEM", if you try with RSA, it simply won't work.

Here I leave some example so that they do not suffer in their search like me: 'v

Step 1: Generate ECDSA PEM keys

```
ssh-keygen -t ecdsa -b 521 -m PEM -f phone.key
```

Step 2: Change permissions

```
chmod 600 phone.key
chmod 644 phone.key.pub
```

Step 3: Upload your keys to the server

```
ssh-copy-id -i phone.key.pub <user>@<server>
```

Step 4: connect without happily 😄

```
ssh -i phone.key <user>@<server>
```

I would upload images, but I'm lazy, so if you have problems and I have time I can respond if it doesn't work for you.

Enjoy!

Credits:
https://r1.community.samsung.com/t5/galaxy-s/unable-to-remotely-connect-to-sftp-server-through-my-fi...
https://access.redhat.com/discussions/5251241

gobanow
Beginner Level 3
Galaxy S

Bro, thanks!

0 Likes
lenard06
Beginner Level 2
Galaxy S
I'm trying to hook up my Bluetooth to my ihome not connecting
0 Likes
lenard06
Beginner Level 2
Galaxy S
Speaker blue tooth
0 Likes