SSH Script For Shell account

This script has been asked of me several times. It is a quick little script to have on your computer to assist in logging into your existing shell account on our server. Just place the following text into a file. Be sure to make the file executable and have the file in your path so you can just type its name into a terminal and have it run.

1. Open terminal (Applications < Accessories < Terminal) 2. Type "mkdir bin" this will create a folder called bin in your home directory. It is supposed to be included in your executable path if it exists. 3. Type "cd bin" 4. Type "vim ubuntuaz" 5. Type "i" for input mode 6. Copy and paste text below by highlighting and using right clicks to select copy and paste #!/bin/sh clear echo "Username on Ubuntuaz: " read user_name ssh $user_name@azloco.com 7. Hit Esc button 8. Hit buttons "Shift + zz" to save and exit 9. Type "chmod 700 ubuntuaz" to make your new file executable
This script has been asked of me several times. It is a quick little script to have on your computer to assist in logging into your existing shell account on our server. Just place the following text into a file. Be sure to make the file executable and have the file in your path so you can just type its name into a terminal and have it run.

1. Open terminal (Applications < Accessories < Terminal) 2. Type "mkdir bin" this will create a folder called bin in your home directory. It is supposed to be included in your executable path if it exists. 3. Type "cd bin" 4. Type "vim ubuntuaz" 5. Type "i" for input mode 6. Copy and paste text below by highlighting and using right clicks to select copy and paste #!/bin/sh clear echo "Username on Ubuntuaz: " read user_name ssh $user_name@azloco.com 7. Hit Esc button 8. Hit buttons "Shift + zz" to save and exit 9. Type "chmod 700 ubuntuaz" to make your new file executable 10. Type Exit. You may also have to log out and back into your computer to have the next step work 11. Open terminal and type ubuntuaz 12. Type in the user name you want to login with. 13. Type in your password 14. Enjoy your shell account

2 thoughts on “SSH Script For Shell account”

  • JeffMartin says:

    mine is a little different

    #!/bin/sh
    #
    echo "Ubuntu server -- "
    #
    ssh ubuntuaz.selfip.com -l Jeff_Martin


    but it works similarly 🙂
    Good script Slofgren.

    • Nice
      Yeah…many ways to skin this cat.
      The biggest difference with mine is it takes the login name interactively. I was trying to have a simple script that would work generically for everyone so they could just copy and paste.

      Now you have me curious has to how everyone else handles ssh login scripts. Does anyone else have something different or more interesting?

Leave a Reply