Skip to content

Instantly share code, notes, and snippets.

@NickWoodhams
Last active August 29, 2015 14:06
Show Gist options
  • Save NickWoodhams/612d0c7c336cd49678e6 to your computer and use it in GitHub Desktop.
Save NickWoodhams/612d0c7c336cd49678e6 to your computer and use it in GitHub Desktop.
Script to quickly add hosts to your ~/.ssh/config file
#!/bin/sh
echo "==========Add Host to SSH Config============="
echo "What NICKNAME will you call the host? "
read host_name
echo "What USER will be logging in? "
read user_name
echo "What IP ADDRESS is the host? "
read ip_address
echo "What SSH PORT is the host using? "
read port
cat << EOL >> ~/.ssh/config
Host ${host_name}
Hostname ${ip_address}
User ${user_name}
Port ${port}
RemoteForward 52698 127.0.0.1:52698
EOL
@NickWoodhams
Copy link
Author

Just add to your $PATH, here's how I add mine.

Added to my ~/.zshrc
export PATH="$HOME/Dropbox/Automation/bin":$PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment