ssh port configuration
I am trying to configure my ssh port from 22 to some non standard port no. availabe information on net suggests to change settings in /etc/ssh/sshd_config. I am not able to find sshd_config in my system. I am using ubuntu 9. I got some related sshdconfig file at some other location but could not find the settings in that file to change for port number.
thanks in advance.
what do you get when you do an ls of the /etc/ssh/ directory?
Originally Posted by ssh_123
(you need to be root or use sudo to edit the file)
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
it is solved partially now. actually Ubuntu installs client side only so there was no no sshd_config. I installed openssh-server and it worked.
I made changes in sshd_config, restart the ssh server and also checked for new port as listening but could not login to a remote machine.
another problem that I add the new port in iptable too but nmap never shows this new port as open port or designated for SSH service so I reverted back to old settings with port 22 and everything was working as before. I mean I could login to remote machine. I don't know what else I should do to make it working with new port no.
you have to change the port in sshd_config or whatever ubuntu puts it at, open the port in all firewalls, and i you're using a router, forward that port to your specific computer. once that's done, and you start sshd, it should connect OK. If not, you missed a step, or have something wacky.
can you run
`ssh -p $portnumber localhost`
and get a connection?