I have a linux server running Ubuntu 16.04. I installed the ssh-server on it and have it running with the sudo ssh service start
and can see it with ps aux | grep ssh
. I want to ssh into it from my laptop (also running Ubuntu 16.04). They are both connected to the same Wifi. When I ssh from my laptop to the server using ssh username@serverIP
, I get
ssh: connect to host <serverIP> port 22: Connection timed out
Since some of the recommendations here was to use another port number and not 22, I changed the port to 2220 in the /etc/ssh/sshd_config
file on the server. I then ssh from my laptop using ssh username@serverIP -p 2220
and I get the same connection refused error.
Next I went and manually changed the IP address and netmask of one of the interfaces on the server using ifconfig eth0 <laptopIP + 1> netmask <laptop_subnet>
so that it falls under the same subnet as my laptop is. I then tried to ssh using ssh ssh username@LaptopIP+1 -p 2220
and I get
ssh: connect to host <laptopIp+1> port 2220: Connection refused
Am I over complicating this? How do I get a connection to this server?