Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: reloading ssh while setting up a server

  1. #1
    Join Date
    Jan 2012
    Beans
    13

    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:

    Code:
    service ssh reload
    but it tells me "reload: unknown instance:"

    any help as to what I should do would be much appreciated!

  2. #2
    Join Date
    Mar 2009
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 12.10 Quantal Quetzal

    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)

  3. #3
    Join Date
    Jan 2012
    Beans
    13

    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

  4. #4
    Join Date
    Mar 2009
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: reloading ssh while setting up a server

    Ah, my bad. 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?
    Last edited by SuaSwe; January 25th, 2012 at 02:30 AM. Reason: added question

  5. #5
    Join Date
    Jan 2012
    Beans
    15

    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.

  6. #6
    Join Date
    Jan 2012
    Beans
    13

    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:

    Code:
    /usr/bin/ssh

  7. #7
    Join Date
    Jan 2012
    Beans
    13

    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.

  8. #8
    Join Date
    Feb 2009
    Beans
    Hidden!

    Re: reloading ssh while setting up a server

    Quote Originally Posted by mwd5650 View Post
    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

  9. #9
    Join Date
    Jan 2012
    Beans
    13

    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".

  10. #10
    Join Date
    Jan 2012
    Beans
    13

    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!

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •