Menu driven ssh.
2010-05-24
102 words
1 min read
I have quite a lot of servers where I need to ssh at workplace and I generally don’t remember all of them, so I wrote a simple yet useful script. In all the servers I have already copied my key so I dont need a password to login. Without much ado, here is the script.
echo ”Enter the server name:”
echo ”1. redhat”
echo ”2. fedora”read server
if [ ”$server” = ”1” ]; then
ssh amit@redhat
else if [ ”$server” = ”2” ]; then
ssh amit@fedora
else
echo ”Not a valid choice”
fi
fi
You can download the script <a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/09/ssh_menu.sh">ssh_menu.
Related Articles:
- 2010/05/19 bash script to change icon theme to check out all the installed themes (personal)
- 2010/05/07 bash script to periodically change the cursor theme.
- 2010/02/10 bash script with sql to get the number of records from multiple tables.
- 2010/05/19 Display the history and optionally grep
- 2010/05/12 Get the most favourite commands from commandlinefu
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.