Permission denied on ssh access with cygwin
The default username format is:
SERVERNAME+username@SERVERNAME
Or edit the /etc/passwd
entry as shown above to make the format simpler.
Here is a site I found useful for configuring Cygwin SSH:
https://dbaportal.eu/2015/03/05/installing-openssh-cygwin-1-7-35-on-windows-2012-r2/
You can try connecting using the verbose option:
ssh -vvv SERVERNAME+username@SERVERNAME
Check that the \home
folders exist and permissions are correct for the user.
Related videos on Youtube
Comments
-
Ratbert over 1 year
I have a fresh Windows 10 family (x64) install with an Administrator account
Jean Perrin
. I installed cygwin with openssh and modifiedC:\cygwin64\Cygwin.bat
this way:@echo off C: chdir C:\cygwin64\bin set CYGWIN=binmode ntsec bash --login -i
Then, I ran into
ssh-host-config
, answeredyes
to install sshd as a service,no
to privilege separation and let the field empty for thevalue of CYGWIN for the daemon
. I asked for a new privileged accountljp
, and checked withnetplwiz
that this account has Administrator privilege on the host.I created the
/home/ljp
directory manually withmkdir
.Then I started the sshd service with
net start sshd
and was able to login with theJean Perrin
account:$ ssh Jean\ Perrin@localhost Jean Perrin@localhost's password: Last login: Fri Jan 29 11:03:50 2016 from ...
However, when I want to connect with the
ljp
account, I get a permission error:$ ssh ljp@localhost ljp@localhost's password: Permission denied, please try again
I tried to follow the advice found here and did
mkpasswd -l > /etc/passwd
but it didn't changed anything.
What am I doing wrong ? How can I connect via ssh with this account ?
-
Jakuje over 8 yearscheck the logs from
sshd
. It should tell you why it failed.
-