Automating the SSH Login Process.
Hello all Linux Gurus,
I am trying to make a batch script that will automatically setup up an SSH Tunnel so that I may filter my web traffic. I'm a little paranoid about putting my password in a plain text file. Is there another way to automate the process so all I would have to do is double click a script to start the tunnel? It's late so if you need clarification just ask. Thanks to all that reply. Mike |
Use key based authentication instead of passwords. If you Google for "ssh key based authentication" or similar, you should find a number of sites telling you how to do it. You'll need to use ssh-keygen to generate your keys.
|
Here's how to use rsa key auth
http://news.softpedia.com/news/How-t...on-38599.shtml |
is there any way write a script that will enter a pass phrase, but somehow encrypt it so prying eyes can't figure it out?
|
well you could write the script in C and compile it into a binary, that should provide some protection
|
You can also try 'expect' script. Using which you can automate ssh login process.
No need to configure any ssh key authentication. Password change doesn't effect unless you maintain right password to be passed during expect script trigger. You can also try tcl/tk program. |
Quote:
As mentioned, expect(1) is an option (but it requires a password in clear text). Another option is pubkey authentication + ssh-agent(1). --- After reading some of the other replies: Yes, you could lock this away in a compiled binary and set appropriate file permissions. That should discourage the majority of (certainly not all) folks. |
Thanks again for helping me out with this...SSH agent seems like a winner. :)
|
All times are GMT -5. The time now is 11:16 AM. |