Quantcast
Channel: Can you set passwords in .ssh/config to allow automatic login? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 16

Answer by ricffb for Can you set passwords in .ssh/config to allow automatic login?

$
0
0

There is a slight variant of a way described in the blog on how to use sshpasswhich can be found here. Given that you have a gpg encrypted password (how ot do this is described in the blog) file you could do something like this:

 sshpass -p $(echo $(gpg -d -q .sshpasswd.gpg)) ssh your_desination.xyz

and simply save that command as an alias in your .bashrc .

If you want to tunnel through that connection you could do something like

 Host actual_dest      Hostname actual.dest.xyz      User username      ProxyCommand sshpass -p $(echo $(gpg -d -q ~/.sshpasswd.gpg)) \                    ssh your_destination.xyz nc %h %p

Viewing all articles
Browse latest Browse all 16

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>