Results 1 to 10 of 19

Thread: can't ssh into server unless a user is logged in

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Beans
    7

    can't ssh into server unless a user is logged in

    So I've managed to set up my desktop to be used as ssh server when needed. I can ssh into it from my laptop both in and out of the network, but only when I have physically logged into the desktop. Authentication is setup for only RSA public/private key. I've uncommented the line in sshd_config that points towards the 'authorized_keys' file in ~/.ssh/ Not sure what I should do, didn't have this problem in 8.10. Only arose when I did a clean install to 9.10. Let me know if I should attach my sshd_config, known_hosts, authorized_keys, etc.

  2. #2
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: can't ssh into server unless a user is logged in

    Network Manager only activates the network on login, and apparently doesn't play nice with /etc/network/interfaces like it used to... To activate the network on power-up - you may need to disable Network Manager (I hate to recommend removing it entirely - but that might be the next step).
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  3. #3
    Join Date
    Dec 2008
    Beans
    7

    Re: can't ssh into server unless a user is logged in

    Thanks for the response Iowan, but was it directed towards my post or was it a mis-post? I'm not sure I follow what Network Manager has to do with it (nor have I ever actively worked with it). Happen to have any instructions or links to disable it?

  4. #4
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: can't ssh into server unless a user is logged in

    It was intentional - desktops from Hardy onward normally use Network Manager by default (servers without desktop still use /etc/network/interfaces). As the versions progress, NM seems to become more aggressive - I had my Jaunty laptop configured via "interfaces" without removing NM, but Karmic doesn't seem to work the same way.
    System>Preferences>Startup Applications might let you disable NM. you can then try setting up your interface via /etc/network/interfaces - even to get DHCP address. - If it doesn't work, you can un-do things - until you un-install something...
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  5. #5
    Join Date
    Dec 2008
    Beans
    7

    Re: can't ssh into server unless a user is logged in

    So I disabled (or at least unchecked) Network manager from System>Pref>Startup App.
    My interfaces looks like:
    Code:
    auto lo
    iface lo inet loopback
     auto eth0
    iface eth0 inet static
    	address 192.168.1.143
    	network 129.168.1.0
    	netmask 255.255.255.0
    	broadcast 192.168.1.255
    	gateway 192.168.1.1
    For what it's worth, if I try to SSH into the desktop during Post/Grub etc, it comes back:
    ssh: connect to host jourosis.ipstuff.com port 1199: No route to host

    During Ubuntu startup, but before the login screen:
    ssh: connect to host jourosis.ipstuff.com port 1199: Connection refused

    At the login screen:
    Permission denied (publickey).

    Any further ideas? Is a full uninstall of Network Manager necessary?

  6. #6
    Join Date
    Dec 2008
    Beans
    7

    Re: can't ssh into server unless a user is logged in

    Hmm....as an interesting fact: I can ssh in at the login screen if I use 'root' instead of my username. Same RSA key works fine...so now I'm intrigued.

  7. #7
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    16,455
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

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
  •