Original ssh just used keys, which as you point out have the problem that expired keys can continue to be used.
OpenSSH also supports certificates, Google for: openssh certificate authentication
I have not looked closely at this but it looks like it addresses your problem, as this applies to more then just smartcards.
Note that the CA certificates need to be added to the server. I am note sure but since "CAPI:" is show on the screen
implies that it should be using certificates.
I don't know what your environment is, but if Windows Active Directory or Kerberos are are available,
a smartcard can be used with both to login to AD (that uses Kerberos PKINIT) and from there you can access any other
machine in the domain or Kerberos realm. SSH can use GSSAPI which is Kerberos based.
I am retired, but we were using gov issued PIV cards for AD and access to linux systems that were joined to AD domain.
and also use Shibboleth for cloud access that uses AD as a backend user database. Some cloud applications required
PIV card to accesss. The fact that the certificate was for a private key that resided on the PIV card, could then
address some HIPPA issues with some cloud applications.
I would suggest that if you have questions on SSH and smartcards use IDManagment or OpenSSH mail list or
stackexchange.com.
On 5/15/2024 1:48 AM, Pooja Bagga wrote:
> Hi Douglas,
>
> * When we add pubkey to the authorized_keys file, do we need to add *any prefix *to the copied pubkey to make SSHD understand that its certificate based authentication which client is trying for ?
> * OpenSSL has the capability to check the valid certificate issuer , and if a cert is expired or not. With expired cert, user is expected to not login. But when we use the expired Smart Card in
> PuttyCAC and copy the key file and copy the content to authorized_keys file (#5,#6 in the link), then if we try to login using SSH, the user will be able to login. What will be the expectation
> for SSH login with an expired certificate ?
> * User is able to login using the steps mentioned in the link, but sshd debug logs mention that its *public key authentication* and not Certificate based authentication.
> * image.png
> <mailto:
piv-test-cards%2Bunsu...@list.nist.gov <mailto:
piv-test-cards%252Buns...@list.nist.gov>>
> <mailto:
piv-test-cards%2Bunsu...@list.nist.gov <mailto:
piv-test-cards%252Buns...@list.nist.gov>>.
> <mailto:
piv-test-cards%2Bunsu...@list.nist.gov <mailto:
piv-test-cards%252Buns...@list.nist.gov>>
> <mailto:
piv-test-cards%2Bunsu...@list.nist.gov <mailto:
piv-test-cards%252Buns...@list.nist.gov>>.
Douglas E. Engert <
DEEn...@gmail.com>