Ubuntu Linux: Start / Stop / Restart OpenSSH ( SSH ) Server

by Vivek Gite on October 8, 2007 · 3 comments

I need to provide a remote access to my Ubuntu Linux server. How do I start / stop OR restart the ssh server under Ubuntu Linux operating system?

You need to run a script called /etc/init.d/ssh to stop / start / restart OpenSSH server. You can also use the service command to control a System V init script.

Ubuntu Linux: Start OpenSSH Server

Type the following command:
$ sudo /etc/init.d/ssh start
OR
$ sudo service ssh start

Ubuntu Linux: Stop OpenSSH server

Type the following command:
$ sudo /etc/init.d/ssh stop
OR
$ sudo service ssh stop

Ubuntu Linux: Restart OpenSSH server

Type the following command:
$ sudo /etc/init.d/ssh restart
OR
$ sudo service ssh restart

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 3 comments… read them below or add one }

1 ORLY July 30, 2008

Really? Starting, stopping, and restarting all require the exact same instructions?

Reply

2 vivek July 31, 2008

Thanks for the heads up, it was a typo. The FAQ has been updated.

Reply

3 Alex Beamish October 25, 2011

Maybe this should be updated with the new ‘service $foo (start|stop|restart)’ offering?

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 15 + 15 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: