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
echo ”Not a valid choice”

You can download the script <a href="">ssh_menu.

Tags: bash script ssh


Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it