After restart, how can I ssh into my system?

6,558

By default, connection to network go up when the user login. So, if you have not configured your machine to login automatically, your network connection is down.

The solution is to set the connection as a "system connection" in network manager: in this way the connection go up when the machine boot up, and do not wait for a user to login.

Share:
6,558

Related videos on Youtube

David LeBauer
Author by

David LeBauer

Updated on September 18, 2022

Comments

  • David LeBauer
    David LeBauer over 1 year

    I have restarted my system remotely, but now when I try to ssh, I get the message

    ssh: connect to host desktop.hostname port 22: Connection timed out
    

    And when I try to ping it:

    PING desktop.hostname (111.111.111.11) 56(84) bytes of data.
    From localhost (222.222.222.22) icmp_seq=1 Destination Host Unreachable
    

    Is there a way to remotely access my computer?

    • theTuxRacer
      theTuxRacer about 13 years
      Since it cannot be pinged, and sshed, I am assuming that the PC hasnt been restarted yet, or there is some network trouble. If you have a monitoring panel, like cPanel or use Amazon Webservices, I recommend that you restart the machine again. I sometimes face the same problem after restarting or deploying new servers, and usually have to restart or wait for a few minutes before trying again.
    • belacqua
      belacqua about 13 years
      Agree with @kaustubh -- unless you have reason to believe pings are being blocked, being unable to ping usually indicates you don't have minimal network connectivity. And without that, of course, no applications that rely on network connectivity (e.g., ssh) will work.
    • theTuxRacer
      theTuxRacer about 13 years
      @jgbelacqua Just because we are on the topics, pinging is not a reliable method of establishing that a computer is up, because my servers don't respond to pings.
    • belacqua
      belacqua about 13 years
      @kaustubh "Unless you have reason to believe pings are being blocked" I know it isn't reliable in a blackbox scenario, but if you're the admin, and you allow it as a troubleshooting tool, then you know failure usually means a loss of net connectivity. The network group I'm in has policies either allowing things like icmp, CDP, LLDP, etc., or not, but as long as you either control the environment or know the expected behavior, you know what tests should work. There are pros and cons, but ping can be a nice initial check before doing validation and real troubleshooting.
  • david6
    david6 over 12 years
    That is NOT correct, for a remote SSH connection. What you have said is valid, but ONLY for a VNC (or similar) remote desktop connection.
  • enzotib
    enzotib over 12 years
    @david6: that was CORRECT for 10.04, that the answer was referring to; and this has absolutely nothing to do with ssh or vnc
  • david6
    david6 over 12 years
    I have four servers, all with 10.04 LTS, and I can ssh to them without anyone logging in first.
  • enzotib
    enzotib over 12 years
    @david6: on ubuntu desktop the connection, managed by Network Manager, was set by default as NON-system connection, so that it started when the user login. The OP acceted my answer, so it means that it was exactly in this situation.
  • david6
    david6 over 12 years
    Sorry, I don't follow.. I have several desktop PCs, all on 10.04, for a science monitoring project. They are unmanned, and spread over several countries. I am able to monitor, restart, and update them all over SSH.