6

I'm using PC without Administrator privileges and I need to set up SSH server. I've tried mobaSSH and also freeSSHd but both requires Administrator privileges. Then I've found Win32-OpenSSH which seems that it might be finally working. To be honest I do not actually understand why such services requires Administrator privileges because I've set up e.g. FTP server listening on port 21 with no problems but OK, back to the question.

I've run ssh-keygen.exe -A included in Win32-OpenSSH which created following files in Win32-OpenSSH directory:

ssh_host_dsa_key
ssh_host_dsa_key.pub

ssh_host_ecdsa_key
ssh_host_ecdsa_key.pub

ssh_host_ed25519_key
ssh_host_ed25519_key.pub

ssh_host_rsa_key
ssh_host_rsa_key.pub

Then I've started sshd.exe. My first attempt was to connect with putty.exe using: USERNAME@localhost. I've used same credentials as I'm using to Windows login but it did not work:

Using username "USERNAME".
USERNAME@localhost's password:
Access denied
USERNAME@localhost's password:

Second attempt was using puttygen.exe to convert ssh_host_rsa_key to *.ppk file and load this file with pageant.exe and then use same step as in first attempt. After this the sshd.exe message changed as you can see but login still did not work:

Using username "USERNAME".
Authenticating with public key "imported-openssh-key" from agent
Server refused public-key signature despite accepting key!
USERNAME@localhost's password:
Access denied
USERNAME@localhost's password:

I guess that the server is installed correctly and the problem is with authentication. How to correctly set up Win32-OpenSSH to being able login either using password or key?

0

1 Answer 1

4

For a password authentication, use just USERNAME. The USERNAME@localhost cannot work.


To make the public key authentication working:

  • Create the .ssh folder with authorized_keys file with your public key in your Windows account profile folder (typically in C:\Users\username\.ssh).
  • Make sure the only a respective Windows account has a write access to the folder and the file (what is the default access level, if you create the folder and the file, while logged in using the respective account).

For details on both, see my guide to Installing SFTP/SSH Server on Windows using OpenSSH.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .