I got a certificate warning when opening the page.
Interesting, would you mind letting me know which browser/version you're running? and the error message if possible?
Simple Two-Factor SSH Authentication
21–30 of 47 posts
Re: Simple Two-Factor SSH Authentication
#22As noted alsewhere, ForceCommand is a nicer option, and can be done with something like this in sshd_config: Match group yubikey # ForceCommand /usr/local/bin/yubikey.sh ForceCommand /usr/local/bin/mobileverification.sh The commented out script is something I wrote to authenticate Yubikeys - see http://yubico.com/yubikey And the mobileverification.sh sends a randomly generated 4 digit pin code to the phone number tha…
These are much more sensible that the OP's solution. Just to be clear to anyone reading, because it's not really explained: * OP double-protects the SSH key. It means you need the key's passphrase and another factor (Google authenticator) to decrypt the ssh key. Then the ssh key is used to auth with the server. => the authentication with the server is still one factor auth, compromising the key at any level still gra…
Doesn't ForceCommand do exactly the same thing except it allows you to do it globally?
Re: Simple Two-Factor SSH Authentication
#23if you exec the shell on your own (and make auth decisions on your own) outside of PAM you are basically destroying meaningful logging of successful/unsuccessful authentication, right?
You can log the events yourself. If it's a shell script, it would be as easy as: logger -p authpriv.notice "Some message about authentication"
Re: Simple Two-Factor SSH Authentication
#24Beware that this may break apps that use SSH as a transport protocol (like rsync and mercurial, depending on your setup of course).
Re: Simple Two-Factor SSH Authentication
#25Re: Simple Two-Factor SSH Authentication
#26Could a user bypass this by using: ssh user@host.com -Tv 'bash' ?
Re: Simple Two-Factor SSH Authentication
#27In the authorized_keys script, if instead of exec()ing SHELL you use SSH_ORIGINAL_COMMAND you won't break "ssh myhost "
Re: Simple Two-Factor SSH Authentication
#28Beware that this may break apps that use SSH as a transport protocol (like rsync and mercurial, depending on your setup of course).
The extended example 'should' work with those kinds of apps. The trivial example does not.
Re: Simple Two-Factor SSH Authentication
#29Re: Simple Two-Factor SSH Authentication
#30In the authorized_keys script, if instead of exec()ing SHELL you use SSH_ORIGINAL_COMMAND you won't break "ssh myhost "
In the extended example it does actually use the SSH_ORIGINAL_COMMAND, will update the simple version too