Tag Info

Hot answers tagged


The OpenSSH sshd command has an extended test switch which can be used to "Check the validity of the configuration file, output the effective configuration to stdout and then exit." (source sshd man page). So the answer is (as root, or prefixing it with sudo): sshd -T (the settings are not in alphabetical order, one can use sshd -T | sort to quickly look ...


On Ubuntu: $ sudo cat /var/log/auth.log|grep ssh|grep Accept On CentOS/RHEL: $ sudo cat /var/log/secure|grep ssh|grep Accept This will show all connections, and how they authenticated [since the log file's last rotation]. If you only want to see password connections, just pipe through another grep: ... grep ssh|grep Accept|grep password


Environment variable approach Here's one possibility....if you're happy to have PermitUserEnvironment set to true in your sshd_config then you could use a combination of environment variable against the key and some checking in /etc/profile to alert/reject anyone still using password approach. In your $HOME/.ssh/authorized_keys file you'd have something ...


In order to attack a server the attacker must first know its IP address. With IPv6 you will have so many addresses to choose from that it is not feasible to find the correct address by scanning the IP range. This means you can simply assign two different IPv6 addresses to the interface. You let the domain name of your site keep pointing to the same IP ...


If there are no users in the ssh_group group and you can still login through SSH, is it possible you are a member of the wheel group? If you can login through SSH without being a member of either group, then there is something wrong elsewhere in the configuration. To add users to this group, you will want to use: usermod -a -G ssh_group user1 This ...


Check the logs on the server to see what's going wrong. I expect sshd is complaining that your configuration file is ill-formed. The option TCPKeepAlive cannot be used in a Match block, presumably because sshd doesn't support changing the value of the option once authentication has finished (this option is used from the start of the connection, before Match ...


Uncomment line: # AuthorizedKeysCommandUser nobody in file /etc/ssh/sshd_config and restart sshd

Only top voted, non community-wiki answers of a minimum length are eligible