Score:0

ubuntu server must login locally before ssh

mu flag

I have set up an ubuntu server machine and forwarded all ports and such. I can access it outside my LAN unless the power goes out or I restart the machine. Then I have to manually log in on the machine. Since the machine used to be a laptop I only used on LAN, I never really had this problem. Now I must connect after a power cut without a manual login. I know someone who can go and login but this cannot happen every time. I just have to login with username and password; No decryption key needed. Is there any way that I can change something on the server so I can always SSH it even if it is not locally logged in? I don't use SSH keys or anything that complicated. All of the other services, such as a web server and a voice chat server do not start either. I'm really not sure what to do from afar. I know that it works on my debian sid laptop running XFCE if that helps

UPDATE: I have figured out that I could autologin with getty on a user with no privileges. This would then allow me to remote access it all I need to. I know that one could break into the server from this user, but I will try to make it so that it cannot be remotely logged in. This server is on private property and will not have a high chance of anyone trying to crack into it. Is there any reason why this would be a horrible idea?

paladin avatar
id flag
You have configured your server in a wrong way. For me it sounds like someone has started the SSH-server as an autostart server for an user, rather than a system service, using systemctl. You usually start (and make it autostart on reboot) the SSH-server with `sudo systemctl start ssh.service && sudo systemctl enable ssh.service`. Everything else is wrong.
Score:0
cn flag

You say LAN, but do you mean WiFi? Could it be that the WiFi credentials were setup using the GUI and are tagged as only for use by the user that must log on?

Check how the network is configured, there should be a checkbox to allow use by all users. e.g.

enter image description here

axel_axel_ avatar
mu flag
I don't know if I have been an idiot the whole time but is there a GUI for ubuntu server that you can access over a certain port? I am using ethernet for the server by the way.
cn flag
The image is from the gnome network settings utility, but it is just showing flags from NetworkManager, you should be able check the settings with the `nmcli` command line tool to check the `connection.permissions` field on the connection
axel_axel_ avatar
mu flag
would this have the same effect as physically logging in every time where I can ssh non locally without any issue? would the autologin edit that I made do this as well to your knowledge?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.