SSH Port change problem for SFTP
Good day,
I am able to change the port via following and ...
I had did a "netstat -lnp | grep sshd" and it shows my "new" port as well. So I logout of the ssh connection and go to relogin via the new port and it just sits there and then says connection timed out. It doesn't ask me for my login details or anything.
So I have to go into WHM and to terminal and change it back to default 22. Boom everything works back the way it should. What am I missing?
Then I've tried to login even on port 22 via SFTP and it doesn't work. I am told that I need to enable Shell Access. But I've read from this "fairly old thread" that I don't need Shell Access enabled to get it to work?
Thank you for all the help.
-
When you are changing the SSH the port to some different port, make sure you have opened that port in firewall, that is either iptables or CSF and that should fix the issue. 0 -
you will need to tweak the firewall configuration on your server in order to make sure that the server listens on new SSH port. 0 -
Without knowing for sure it appears reasonable to think your new port is blocked by the firewall. Are you running CSF? Shell access is required for the user you try to login with. By default root got SSH access if not configured otherwise. SFTP uses the same port as SSHD. 0 -
As suggested already here you need to ensure the new port is added in the firewall, you also need to ensure that you restart the sshd service once you modify the port. 0 -
Thank you for the reply's. Apparently I didn't set to get notified of reply's. I will check to see if it is a firewall issue. I didn't setup a "server" firewall but it may still set it up automatically. I will report back with my findings. Thank you for the feedback. 0 -
I installed the CSF and changed the port. And then it's like magic it all works! :) Thank you everyone for the help! 0
Please sign in to leave a comment.
Comments
6 comments