-- ChengguangZhu - 2019-10-10

ssh to a server without input long host name and password every time:

On your own linux system, run the following:

ssh-keygen -f xxx      //produce key file xxx  and xxx.pub. You can use a password to protect the key, or just leave password empty
ssh-copy-id -i xxx.pub username@server   // install the pub key to the server you want to log in.  After this command you should be able to find .ssh/authorized_keys on server
cp xxx to .ssh/

make .ssh/config file and add the following lines:

HOST lx         //simple name of the server
   HostName theServerName
   User Username
   IdentityFile ~/.ssh/xx

Now, you can log in with " ssh lx". and log in without password. previously you have to ssh username@server and input password

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2019-10-10 - ChengguangZhu
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback