logoalt Hacker News

tuetuopayyesterday at 8:14 PM1 replyview on HN

SSH bastions would like a word I guess. You can authenticate, but you definitely can’t login (which is also the case for git over SSH).


Replies

kpcyrdyesterday at 11:26 PM

An SSH bastion host allows to request direct-tcpip channels, but is going to restrict other channel types, like pty requests, shell requests, exec requests or other subsystems.

The "login permission" term is confusing because it's likely supposed to mean "shell requests", but SSH channel requests in general are all post auth, which could also be considered a "login". In OpenSSH you still need to explicitly configure permitted channel requests, which I think is what GP is referring to.

For git specifically I would recommend the ForceCommand feature in OpenSSH, all exec requests are then forwarded to this program, with $SSH_ORIGINAL_COMMAND set to the original command. You may then use an allow-list of commands you want to permit.