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)
http://www.softpanorama.org/Commercial_linuxes/Security/linux_pam.shtml#News
Modify pam to do this. I never try this.
You can easily use the
Match
statement (see sshd_config(5)) to distinguish between clients and allow exactly one client (e. g. identified by its IP address) to log in with its password rather than having an SSH key.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.