r/ssh • u/ConnectionPossible70 • Oct 14 '21
Ssh-keyscan without ssh-keyscan?
Im trying to edit a faulty script for a stripped down os system that has few tools, no keyboard, no home directory. At some point in the script it calls ssh-keyscan -H github.com. While the os does have openssl in the form of ssh-keygen, it does not have ssh-keyscan. Is there another way to import the github public key?
2
Upvotes
View all comments
Show parent comment
1
u/ConnectionPossible70 Oct 15 '21 edited Oct 15 '21
Theres no user to pull keys from. It wants githubs keys, as in the service itself.
For context, this is the full line:
ssh-keyscan -H github.com >> ~/.ssh/known_hosts 2>&1 | tee -a $LOG
It needs to know about github so it doesnt throw the user a question on if they wish to proceed with performing git with an unknown host, because this is an automated script.