SSH Problem


5 posts
by MattWilkins » Mon Jul 08, 2013 1:11 pm
Apologies if this is the wrong place to post this.

I'm running the CNXSoft minimal raspbian on my pi at the moment, on the recommendation of raspbian.org.

I'm having a problem with ssh (I'm also fairly new to linux as a whole so it's possible I'm missing something blindingly obvious!). Basically, I can't change any of the config settings for ssh. I'm trying to use AllowUsers to block all but one user and do a few other things like block root access over ssh, but for all my editing of sshd_config in /etc/ssh/ I can't get anything to change. I realised that in /etc/init.d I don't have an sshd script, only one named ssh. I've updated/reinstalled openssh-server and openssh-client multiple times to no avail.

I've been looking around on the internet and the only similar issue I could find was someone having no "ssh" script (they didn't realise it was called sshd) but I have ssh and no sshd!

Could someone please put me out of my misery!?

Thanks!
Posts: 11
Joined: Tue Oct 30, 2012 1:58 pm
by SirLagz » Mon Jul 08, 2013 1:23 pm
the one named 'ssh' is the ssh server.
After you change the configuration, do you restart the ssh server ?
You restart it by running
Code: Select all
/etc/init.d/ssh restart
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by MattWilkins » Mon Jul 08, 2013 1:28 pm
Yeah, I did restart (although I just did it again now and got something completely different than I did yesterday).

Unfortunately I can still ssh using any of the users on the pi.
Posts: 11
Joined: Tue Oct 30, 2012 1:58 pm
by MattWilkins » Mon Jul 08, 2013 1:30 pm
this may shed some light:

Code: Select all
$ /etc/init.d/ssh restart
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
[....] Restarting OpenBSD Secure Shell server: sshdCould not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
. ok
Posts: 11
Joined: Tue Oct 30, 2012 1:58 pm
by MattWilkins » Mon Jul 08, 2013 2:06 pm
I generated new host keys and I can now restart ssh (only as root), but I still can't get the sshd_config to have any effect. :(
Posts: 11
Joined: Tue Oct 30, 2012 1:58 pm