Home > Linux > Lazy SSH login

Lazy SSH login

In my work i use SSH a lot , and some times i find myself so lazy to enter password every time or write the whole command , so here is a time savior technique

  • as we know ssh don’t accept password to be written it something called “interactive keyboard password authentication” so we need some help , install sshpass

$ sudo aptitude install sshpass

Using sshpass you could send password to ssh example(“sshpass -p YOURPASS ssh USER@HOST“)

note: this is not secure at all so don’t use it for online servers.

  • Now all what we need is to put it as command-line aliases or shortcut , to do that add these lines to bashrc file

alias Myssh=’sshpass -p YOURPASS ssh USER@HOST’

note: to access bashrc fileĀ  $ nano ~/.bashrc

and now all what you have to do just write Myssh in terminal and you are in :)

  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn
  • Twitter
Categories: Linux Tags: ,
  1. February 21st, 2009 at 00:27 | #1

    sshpass saved my ass dude!!!
    u can also use its with scp!

  2. February 25th, 2009 at 17:58 | #2

    Use ssh keys instead

  3. February 26th, 2009 at 00:38 | #3

    yah another way to do it in secure way but i see this more easy “laziest way” :D , thanks Ala’a

  4. June 29th, 2009 at 12:21 | #4

    Hey, you forgot to do {source ~/.bashrc} to activate the new changes.

  5. June 29th, 2009 at 12:27 | #5

    :P i forgot that , thanks

  1. No trackbacks yet.