2

I'm trying to set up and configure SSH on a Natty Narwhal server. I've never done this before and have just been following instructions from the hosting service on how to do it. All was going well so far -- I set SSH permissions and changed the default SSH configuration. I'm now trying to set up a firewall and restart SSH, but I get an error when I try to run either:

/etc/init.d/ssh reload

or

sudo service ssh restart 

I get an error stating:

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.

I can't figure out how to fix this! Everything seems to suggest that "service ssh restart" should fix it -- but it's not working. Help!

3
  • it's not an error. It is just an informational warning that your SSH startup script is also configured as upstart job under /etc/init/ Ubuntu is targeting to phase out init script in favor of upstart script. Unknown instance might be caused due the SSH daemon not running in first place. If is already running but still giving this warning, kill the running instances via kill -9 pid . Beware don't try this if you are running a remote session, it will kick you out.
    – kaji
    Jan 25, 2012 at 5:32
  • Thanks. Do you have any idea why my local computer tells me the SSH connection is refused when I try to run 'ssh -p 30000 [email protected]'
    – Ben
    Jan 25, 2012 at 5:47
  • @kaji, you should post that as an answer, not a comment. :-)
    – Wyzard
    Jan 25, 2012 at 6:05

1 Answer 1

0

As per suggestion, i am posting as an answer now.

it's not an error. It is just an informational warning that your SSH startup script is also configured as upstart job under /etc/init/ Ubuntu is targeting to phase out init script in favor of upstart script. Unknown instance might be caused due the SSH daemon not running in first place. If is already running but still giving this warning, kill the running instances via kill -9 pid . Beware don't try this if you are running a remote session, it will kick you out.

'ssh -p 30000 [email protected]' 

command actually tries to login to remote server 123.45.67.890 with username demo at 3000 port.Are you sure the remote server has sshd service running under 3000 port(by default it runs under 22 port). Again please make sure the connection is not being blocked by the firewall

2
  • Thanks Kaji. I have been following this guide: rackspace.com/knowledge_center/index.php/Ubuntu_Hardy_-_Setup, which had me change the port from 22 to 30000 in sshd.config. I've since restored the firewall settings to the defaults and tried to connect to SSH, but still haven't been able to do it. Any ideas what could be preventing the connection?
    – Ben
    Jan 25, 2012 at 14:39
  • @Ben I think your firewall is blocking you to connect at 3000 port
    – kaji
    Jan 26, 2012 at 5:31

You must log in to answer this question.

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