1

I have enabled SSH-keys based authentication on the Ubuntu 14.04 server, disabled root login using SSH and can connect successfully using SSH-keys based authentication with my user account blahblah on my Mac SSH client.

However, to test the SSH login with Password authentication, I used the SFTP login in Filezilla for user account blahblah with its password, and it allowed me to log in without the need for any SSH-keys based authentication.

The /etc/ssh/sshd_config file is as below. As you can see, I have disabled PasswordAuthentication. I have already restarted the sshd daemon by using sudo service ssh restart after modifying this config file. Any ideas why this might be happening?

Port 8888
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation yes

KeyRegenerationInterval 3600
ServerKeyBits 1024

SyslogFacility AUTH
LogLevel INFO

LoginGraceTime 120
PermitRootLogin no
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes

IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no

PermitEmptyPasswords no

ChallengeResponseAuthentication no

PasswordAuthentication no


X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM no
AllowUsers blahblah
4
  • 1
    I'm unable to reproduce the problem. Could you add -l DEBUG2 to the line that reads "Subsystem sftp /usr/lib/openssh/sftp-server" and attempt again to connect? Then edit your answer to include the lines from /var/log/messages relevant to the connection.
    – lgeorget
    Jul 30, 2014 at 22:34
  • Thanks for your tip about adding the debug flag. I realized from /var/log/auth.log on the server that Filezilla seems to actually be using the SSH keys from the Mac SSH agent even though I have entered the password. When I tried to sftp to the server from another computer, the access attempt was rejected as expected.
    – Agrim
    Jul 31, 2014 at 1:56
  • Problem solved then :-). Feel free to answer yourself and accept your own answer. This way it will not be counted as an unanswered category.
    – lgeorget
    Jul 31, 2014 at 7:50
  • Great, I didn't know you could do that. :)
    – Agrim
    Aug 1, 2014 at 12:04

1 Answer 1

1

By looking at /var/log/auth.log, it is verified that Filezilla on the Mac client actually seems to be using the Mac SSH-agent rather than the password entered there.

Verified that SFTP is using SSH-keys authentication by trying and failing to connect through SFTP on another computer.

1

You must log in to answer this question.

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