Skip to main content
Post Closed as "Duplicate" by Gilles 'SO- stop being evil' ssh
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k
Source Link
Archemar
  • 32.3k
  • 18
  • 75
  • 107

providing password to ssh

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.