I am trying to change the port of SSH on an EC2 instance, but I am not getting this to work.
What I am doing is the following:
Open the file /etc/ssh/ssh_config
Uncomment and change the line Port 2345
Save and close
run the command service sshd restart
Now I can still connect to port 22. And when I run the command ssh -p 2345 localhost
i get:
ssh: connect to host localhost port 2345: Connection refused