I'm aware about how to check if a host exists in known_hosts
ssh-keygen -F github.com
I need to do it in a script. Namely, if a host exists - do nothing, otherwise - add it. How would I do it?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityI'm aware about how to check if a host exists in known_hosts
ssh-keygen -F github.com
I need to do it in a script. Namely, if a host exists - do nothing, otherwise - add it. How would I do it?