Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been doing my google-fu, but I can only find outdated guides or guides pertaining solely to the server variations of Ubuntu.

I need to set it up so that ssh server is run on boot, so I can access the computer remotely without having to first physically log in on the host computer. How would I do that? I already have ssh server set up so that I can log in and all that, but first I would have to log in on the host and run sudo /etc/init.d/ssh start

share|improve this question
    
Are you on wireless? –  Leon Nardella Sep 9 '10 at 13:17
    
I am on wireless, yes. –  Tommy Brunn Sep 9 '10 at 13:33
1  
I think you should right click on the connection icon, select Edit Connections, click on the Wireless tab, double-click your wireless connection and mark both "Connect automatically" and "available to all users". That means your connection will be up and running without logging in graphically. –  Leon Nardella Sep 9 '10 at 13:56
    
How would you need the SSH to work? If you simply want the connection active in the background, it's quite easy, but if you want the SSH shell to appear whenever you login, it's a different solution. –  Oxwivi Jun 18 '11 at 9:27
add comment

4 Answers 4

This should do the trick..

sudo update-rc.d ssh defaults

EDIT: If your network is configured with Network Manager then the connection will not be established until a user logs in through the GUI. For manually configuring you have to edit the /etc/network/interfaces file, have a look at this guide and if you use wireless you can have a look here

share|improve this answer
    
I am on a wireless network. That question you linked to last suggested that all I would need to do was to enable the connection for all users. Is that the case? –  Tommy Brunn Sep 9 '10 at 13:36
    
I linked incorrectly, the link is now fixed and additional you can look at this: ubuntuforums.org/showthread.php?t=263136 –  Source Lab Sep 9 '10 at 14:24
    
What is it about this command sudo update-rc.d ssh defaults that should resolve the problem? In other words, what does this command do? –  HairOfTheDog Jul 11 at 16:52
    
@HairOfTheDog it sets the ssh server to start at default runlevels... –  Source Lab Jul 12 at 17:02
add comment

Did you install it with something like apt-get install openssh-server? Because that package always starts ssh by default. If it's not starting by default you probably did something wrong. :-P

share|improve this answer
    
That's unfair - a package maintainer may have changed the default behaviour, so as it only runs on login, or other services it relies on (such as networking) may not run until a user logs in. –  Logos Jul 8 '13 at 10:58
    
If the machine you're trying to contact is getting its ip address via DHCP then you might want to check if the address has changed after a reboot. –  Stefan Schmidt Aug 15 '13 at 11:45
add comment

In order to get a connection at startup with wireless using WPA (WEP is not a problem to set in /etc/network/interfaces), I used to use cnetworkmanager and start it in rc.local. cnetworkmanager will let you use NetworkManager without having to log in to a desktop.

share|improve this answer
add comment

If you install the openssh server from the repository it should start on boot by default, regardless of having a network connection available or not (which is a different issue for which mot people is responding).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.