0 votes
by (120 points)

On starting the server,

User public key
'C:\Downloads\RebexTinySftpServer-1.0.11\keys\key.pub'
loaded. Fingerprint: 15:XX:d2
Public key authentication enabled.

Binding SFTP server to port 22... Starting...
23:30:14.496 Info Server: Starting server.
23:30:14.500 Info Server: Listening for connections at 0.0.0.0:22.
23:30:14.502 Info Server: Server started.
SFTP server has started and is ready to accept connections.

Everything is fine, but when I try to ssh into ssh/sftp via command or SFTP connect via code, it doesn't work anymore. Previously it was working alright, and I could do so.

On cmd ssh into my server,

C:\Windows\system32>ssh 192.168.2.14
Enter passphrase for key 'C:/.ssh/id_rsa':
Password:
Password:
Password:
z@192.168.2.14's password: Permission denied, please try again.
z@192.168.2.14's password: Permission denied, please try again.
z@192.168.2.14's password:
z@192.168.2.14: Permission denied
(password,keyboard-interactive,publickey).

No matter what password I try, it fails.

I'm not sure why it asked for

Password:

And then

z@192.168.2.14's password

again...

The above happens too when I use SFTP command...
I've tried reinstalling the multiple times, but it still fails. It's so frustrating. In the config file, I've already set the passwords all to the same 'password'. I've entered 'password' and also nothing, but it still couldn't work. Where did I go wrong?

Applies to: Tiny SFTP Server

1 Answer

0 votes
by (144k points)
The 'ssh' command is trying to authenticate using a private key stored at 'C:/.ssh/id_rsa', and it's first asking for a password for that file. Is this intended? If not, try this command instead:
sftp -o PubkeyAuthentication=no 192.168.2.14
by (120 points)
Hi Lukas, thank you for your reply.
No, that is not intended. I've tried multiple passwords for that file, but still it fails.

On using your command, it still prompts me for "Password:" and "z@192.168.2.14's password"

I don't think that this could be a firewall issue as I've enabled firewall access for the app as well. Thank you.
by (144k points)
Try adding "-vvv" to the "sftp" command, this will make it produce a detailed log that would hopefully provide more information on what's going on:
    sftp -vvv -o PubkeyAuthentication=no 192.168.2.14
by (120 points)
Adding -vvv didn't help much, but I've realized that I am able to connect to the server on random occasions. That is alright for me.

Thank you so much for your help.
by (144k points)
The -vvv was not supposed to help, but to provide sufficient information to make it possible to detemine what was actually going on under the hood from the log it produces. Is there any noticable difference between a log displayed for successful and failed connection attempts?
...