View Single Post
Old 03-09-2002   #5 (permalink)
 
Posts: n/a
lol.

I really like the line "BTW the shell/prompt whatever is bash2." Hehehe, good stuff.

Here, try this:

First, do all of this:
ssh implements the RSA authentication protocol automatically. The user
creates his/her RSA key pair by running ssh-keygen(1). This stores the
private key in $HOME/.ssh/identity and the public key in
$HOME/.ssh/identity.pub in the user's home directory. The user should
then copy the identity.pub to $HOME/.ssh/authorized_keys in his/her home
directory on the remote machine (the authorized_keys file corresponds to
the conventional $HOME/.rhosts file, and has one key per line, though the
lines can be very long). After this, the user can log in without giving
the password. RSA authentication is much more secure than rhosts authen-
tication.

You'll also have to use ssh-agent to add that key and it's password. "man ssh-agent" to get more info on that. Though a simple `ssh-agent` when the system boots should suffice.


Then use the following script. you need to do the above so that ssh will automagically login otherwise your script will hang waiting for a password.

#begin transfer script
#written by shawn on 3/9/02 to avoid art history homework
#for BACC-Core

domain = ;
remote_user = ;
remote_host = ;
#local_user = ;
#local_host = ;

tar -cpzf $domain.tar.gz *;
scp $domain.tar.gz $remote_user@$remote_host:$domain.tar.gz;

ssh $remote_user@$remote_host;
tar -zxf $domain.tar.gz;
exit;
#end script

That should work. If it doesn't lmk.