I want to allow anyone access to SSH with a valid identity key BUT allow only one IP address to have SSH password access.
How do I do this?
(I'm running on Centos 5.5)
|
I want to allow anyone access to SSH with a valid identity key BUT allow only one IP address to have SSH password access. How do I do this? (I'm running on Centos 5.5)
| |||
|
feedback
|
|
You can easily use the | |||||
feedback
|
|
http://www.softpanorama.org/Commercial_linuxes/Security/linux_pam.shtml#News Modify pam to do this. I never try this. | |||
|
feedback
|
|
You could run 2 sshd's 1 - run normally from init, key authentication only (set in sshd_config) 2 - run from xinetd (http://www.itech7.com/Linux/How-to-configure-SSHD-on-Xinetd) listening on a different port (eg 2222) with a separate sshd_config etc and that port is configured with your local firewall (iptables / whatever) to only allow access from the IP you want. | |||
|
feedback
|