Last active
August 29, 2015 14:06
-
-
Save NickWoodhams/612d0c7c336cd49678e6 to your computer and use it in GitHub Desktop.
Script to quickly add hosts to your ~/.ssh/config file
This file contains hidden or 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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just add to your $PATH, here's how I add mine.
Added to my
~/.zshrc
export PATH="$HOME/Dropbox/Automation/bin":$PATH