Skip to content

Instantly share code, notes, and snippets.

@gonoph
Created October 9, 2023 14:01
Show Gist options
  • Save gonoph/7337b13f7864ed719974d80c74f816d1 to your computer and use it in GitHub Desktop.
Save gonoph/7337b13f7864ed719974d80c74f816d1 to your computer and use it in GitHub Desktop.
sshtmp - quick function to ssh to a machine without remembering the hostkey
# 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