reloading ssh while setting up a server
Hi,
I'm trying to set up an ubuntu server and am definitely an absolute beginner. I've learned a bit about using the command line and know a little bit about navigating linux, but I've never set up a server before. I'm setting up a LAMP stack on the rackspace cloud and have been following their setup instructions so far (found here: http://www.rackspace.com/knowledge_center/index.php/Ubuntu_Hardy_-_Setup, but have run into an error that I don't know how to solve.
I have created a firewall and adjusted some rules in iptables. I want to reload the ssh configuration to use the new ports and settings.
I tried running:
Code:
/etc/init.d/ssh reload
but was told to use the "service(8)" command.
So I tried running:
but it tells me "reload: unknown instance:"
any help as to what I should do would be much appreciated!
Re: reloading ssh while setting up a server
Evening!
I think you need:
Code:
/etc/init.d/sshd restart
(Note, sshd rather than ssh, standing for ssh daemon)
Re: reloading ssh while setting up a server
I tried running that, but it gave me
Code:
-bash: /etc/init.d/sshd No such file or directory
Re: reloading ssh while setting up a server
Ah, my bad. :D Puzzled that neither of those work though - my own server which has SSH installed gives a positive response of "Reloading OpenBSD Secure Shell server's configuration sshd [ OK ]" when sent '/etc/init.d/ssh reload'.
Silly question but do you know for a fact that SSH is correctly installed? What does 'which ssh' give you?
Oh yeah, and exactly what does the "use service command instead" error say?
Re: reloading ssh while setting up a server
On my Ubuntu server this is the command to restart ssh-server
sudo service ssh restart
not service sshd restart
I'm running 10.04 LTS but I don't think it has changed.
Re: reloading ssh while setting up a server
ssh should be installed -- i went through the whole process first and it seemed to work.
which ssh returns:
Re: reloading ssh while setting up a server
Also -- the exact error is:
Code:
Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g., service ssh reload.
Since the script you are attempting to invoke has been connected to an Upstart job, you may also use the reload(8) utility, e.g., reload ssh
reload: Unknown instance.
Re: reloading ssh while setting up a server
Quote:
Originally Posted by
mwd5650
On my Ubuntu server this is the command to restart ssh-server
sudo service ssh restart
not service sshd restart
I'm running 10.04 LTS but I don't think it has changed.
See in bold
Re: reloading ssh while setting up a server
Sorry, I should have written that I attempted using "sudo service ssh restart" and that similarly returned "Unknown instance".
Re: reloading ssh while setting up a server
Any possible explanation why
Code:
sudo service ssh restart
isn't working here? All signs seem to suggest to me that this should fix the issue, but it isn't working!