Created
October 9, 2023 14:01
-
-
Save gonoph/7337b13f7864ed719974d80c74f816d1 to your computer and use it in GitHub Desktop.
sshtmp - quick function to ssh to a machine without remembering the hostkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in .bashrc | |
# - or - | |
# mkdir ~/.bashrc.d | |
# put it in ~/.bashrc.d/sshtmp.bash | |
sshtmp () | |
{ | |
echo "About to temporarily connect to host" > /dev/tty; | |
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment