How Do I Add Entries To A Linux Hosts File When I Don’t Have Root? “hosts” File If I Do Not Have Root Access?

Author: admin  //  Category: Linux

I want to use an alias for a hostname I log into often. But, I can’t edit the hosts file b/c it’s not my machine and I don’t have root. I can’t seem to find the answer on the web, but I’m sure it must be possible.
What can I do?

Tags: , , , , , , ,

One Response to “How Do I Add Entries To A Linux Hosts File When I Don’t Have Root? “hosts” File If I Do Not Have Root Access?”

  1. mb5_ca Says:

    if you log in to that computer using console, you could just create a short shell script in your home directory. You could name the script with a short name, like ’sshme’
    The sshme file would contain these two lines:
    #!/bin/bash
    ssh myaccount@longhostnamethatyouhatetyping
    After you save it, be sure to do:
    chmod +x sshme
    Then you can execute it by typing
    ./sshme

Leave a Reply