I have added the following line to /etc/ssh/ssh_config

PasswordAuthentication no

And restarted my sshd with

sudo service sshd restart
sudo service ssh restart

No output from either, dont know if it restarted or not. Tryed restarting with this too:

sudo /etc/init.d/ssh restart

But still when I connect via SSH it prompts for credentials and lets me log in. I'm not doing anything differently from the 4 versions of Ubuntu previously which I have done this for - any ideas why Ubuntu 15.04 no longer respects the "PasswordAuthentication no" line?

2 Answers 2


Two near identical config files:




For the SSH server, put the setting in the sshd config file, NOT the ssh config file.

apt-get install openssh-server

cd /etc/ssh/
vi sshd.config

#PasswordAuthentication yes

uncomment it and change it to NO

PasswordAuthentication no

then restart the ssh service

service ssh restart

root@stack:/etc/ssh# service ssh restart
ssh stop/waiting
ssh start/running, process 4118

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.