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?
31 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.
- Install
openssh,sudo apt-get install openssh-server - Backup the default config,
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.factory-defaultsthensudo chmod a-w /etc/ssh/sshd_config.factory-defaults - Make any changes that you like,
sudo gedit /etc/ssh/sshd_config. Check theopenssh/sshman page for instructions on configuringsshd_config - Remember to restart the service to apply changes,
sudo restart sshorsudo systemctl restart ssh - You can also make sure the
sshport is open oniptables. I almost never have to do this but if you need to.sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT