Click to See Complete Forum and Search --> : Make sshd only listen on certain IP/interface?


BrianPMullaney
06-29-2004, 01:10 PM
I have a RHEW machine here that has a bunch of IPs associated with it. I was curious if there's a way to get sshd to only accept ssh requests on a specific IP address or interface (eth0, etc)?

If anyone has an idea, please let me know.

elderdays
06-29-2004, 01:15 PM
Set this in your /etc/ssh/sshd_config file.

Where it says ListenAddress put the IP of the interface to use.

elderdays
06-29-2004, 01:16 PM
BTW, don't forget to restart the ssh daemon. Mine is done like this: /etc/rc.d/rc.sshd restart. Redhat has some prettier and unnecessary way of restarting services, but I don't remember what it is off hand.

BrianPMullaney
06-29-2004, 01:51 PM
Well, that was stupidly easy. I was looking in the ssh_config file, and not the sshd_config file. No wonder I couldn't find it.

Thanks!

elderdays
06-29-2004, 04:05 PM
I had just happened to be messing with that file not 15 minutes before you asked this and remembered seeing that option. Glad I could help:)