4
1
I have a Linux machine running Centos 7. I am trying to ssh into the machine using putty or WinScp and unable to do that.
I have opened the ssh port using:
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
I have paled the public key inside the authorized_key file.
I have edited the /etc/ssh/sshd_config
file and enabled the PublickeyAuthentication
.
After that i have restarted the sshd service: systemctl restart sshd.service
.
Still, i am not able to reach the servers. I thought it might be an internet connection issues but I am able to go online from the machine.
The error i receive from putty upon connection is : Network error: Connection timed out
.
What am i missing? how do i fix that issue? Any help would be appreciated. Thank you.
Please ask additional questions and I will keep updating answer as we go. – Mariusz Zieliński – 2017-12-05T05:00:42.320
After using
netstat
i saw that the ports hasn't been actually open, I haven't saved the iptables configuration. I ended up changing the ssh port in thesshd_config
file end opening the port / saving it in the iptables. – Dany Lavrov – 2017-12-06T00:02:07.513