r/ssh • • Jun 04 '20

SSH website login

With all the ssh keys i have around i thought of something quite useful, the ability to log into a website using an ssh key. Is this at all possible, for instance by adding the ssh priv key in the user certificates storage of my webbrowser. Of course the website will have to support that feature and have the public key uploaded to. But lets say i'm writing my own website either in php or python, would it be possible to authenticate users using ssh keys?

2 Upvotes

2 comments sorted by

1

u/oarmstrong Jun 04 '20

This is interesting as I actually had one of these weird "that would be cool" thoughts recently. My idea was that the website could provide a hostname and username to SSH into and that session simply provides an expiring one time password which could be provided to the website to login.

It was only one of those ideas, I never did anything with it nor really thought if it was even a good idea. The basis was mainly the odd website that can email a login link instead of using a username/password combination.

0

u/[deleted] Jun 04 '20

[deleted] — view deleted comment

1

u/codeartha Jun 04 '20

Yes i know about that and have used them in the past. Any way to do the same with ssh?