Score:0

OpenSSH isn't working on Ubuntu server minimal install

us flag

This isn't my first time experiencing this issue but every time on every distro I have ever used when installing OpenSSH it just doesn't work.

Commands Run

sudo apt-get install openssh-server
sudo service start ssh
sudo service status ssh
sudo apt-get install ufw
ufw allow 22 

I restart every service after the install. I check /var/log and there is NOTHING for SSH. I get Connection Refused every time I login remotely. So I log in locally with:

ssh user@localhost # SUCCESS
ssh [email protected] # The only private IP address it's using to talk to my router. SUCCESS

SO I log into a seperate device on my network on the same range and do a

ping 192.168.0.4 # SUCCESS
telnet 192.168.0.4 22 # Connection Refused - to check to see if the port is open*
ssh [email protected] #Connection Refused. 

I've edited the config file and everything. Still no dice. Can someone send me to a video of something where someone has installed a minimal server image and then ssh to it from an external device on the same network?

And yes. The device I'm failing to login from can indeed SSH to any non minimal install build.

Alternatively, is there a separate ssh package to OpenSSH?

in flag
You should have seen errors from some of those commands. For example, services are: `sudo service {service name} {action}`, whereas your command has flipped the last two around. Could you [edit] your question to include any error messages you received? This will make it easier to offer a solution
WU-TANG avatar
cn flag
how are you getting "connection refused", that seems like the connection made it through the firewall and was denied during processing. Have you tried this without installing ufw or at least disabled it???? In addition to the above comment, you should add a verbose flag, -v to your command to inspect the messages be sent back and forth. You also didn't say what versions you are running. Are you using version 12.04 and sending mismatch key/hash algorithms?
Michael avatar
us flag
Yes. Sorry it was a mistype. I did the service command correctly. The SSH service is fine as I can log in locally to every interface but trying to log in externally just doesn't work. UFW was not installed by default on the minimal image. I had to download it. I did disable it and test with no success but perhapse I needed to turn off iptables or whatever other firewall it was using.
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.