openssh-server can't connect remotely

I've got a fresh install of 16.04.3 desktop with openssh installed. I can connect to ssh on the same machine, but not across my internal network. ufw is inactive.

The server host cannot be pinged by other hosts on my local network. It also cannot ping other hosts on the local network. The server host is able to be ping google.com, yahoo.com, etc.

What am I missing to get ssh to work remotely?

3

1 Answer

Usually when i need to access my Linux machine from ssh remotely, i just install ssh with sudo apt-get install ssh and by default it does what i need it to do. Connect via ssh from any PC.

Ubuntu also has their documentation on configuring openssh.

  1. Install openssh, sudo apt-get install openssh-server
  2. Backup the default config, sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.factory-defaults then sudo chmod a-w /etc/ssh/sshd_config.factory-defaults
  3. Make any changes that you like, sudo gedit /etc/ssh/sshd_config. Check the openssh/ssh man page for instructions on configuring sshd_config
  4. Remember to restart the service to apply changes, sudo restart ssh or sudo systemctl restart ssh
  5. You can also make sure the ssh port is open on iptables. I almost never have to do this but if you need to. sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
12

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like