mercredi 25 février 2015

providing password to ssh [duplicate]



This question already has an answer here:




The situation:



  • I have an IP : 192.168.1.1 $IP

  • username : root (or whatever) $USER

  • and a passwd: foo $PASSWD


Is there a way to give $PASSWD to ssh ? like



PASSWORD_VAR=$PASSWD ssh -l $USER $IP



  • user can see the password,

  • user must "land" on usual interactive shell session.

  • somme package might be installed on desktop linux if need be.


reading ssh(1) give me no clues. such thing exists in window's world (e.g. Kitty), now I would like to do the same in unix (suse or unbuntu if that matter).


I know how to set up public/private key pair, but this is off topic.



Aucun commentaire:

Enregistrer un commentaire