[ale] automating an ssh script?

ChangingLINKS.com x3 at ChangingLINKS.com
Thu Jul 25 19:11:03 EDT 2002


Okay, it looks like I made _some_ major progress, but I still cannot do 
anything without giving a passphrase.
Thanks to Michael Hirsh (and others) for giving me some directions that I 
could use to get some results. Here are the commands that I ran. Can someone 
edit these so that I know what I did wrong?

rm -rf ~/.ssh   //to start .ssh from scratch
ssh-keygen -t rsa1  //to generate type1 public and private keys
cp ~/.ssh/identity ~/.ssh/authorized_keys  //to create a file for the remote 
machine
cp ~/.ssh/identity.pub ~/.ssh/authorized_keys2  //ditto
ftp ~/.ssh/authorized_keys AND  ~/.ssh/authorized_keys2 to remote machine's 
~/.ssh //upload files
ssh user at shell1.host.com //test .ssh to see if it works
exit  //thinking I should exit to run next command locally
eval `ssh-agent`
ssh-add ~/.ssh/identity
ssh user at shell1.host.com //testing to see if I connect passphraseLESS
eval `ssh-agent` //failed to connect without passphrase, decided to run eval 
on remote machine

FAILED TO CONNECT WITHOUT USING A PASSPHRASE.

I do not own the remote box. How can I "Ensure that RSA authentication is 
enabled for both the server ("RSAAuthentication yes" in sshd_config on the 
server"? Tried downloading the file from my server - permission denied. Ftp 
client crashed second time.
-- 
Wishing you Happiness, Joy and Laughter,
Drew Brown
http://www.ChangingLINKS.com


On Wednesday 24 July 2002 22:44, ChangingLINKS.com wrote:
> Yo yo yo! <- New York Santa Claus
>
> I am trying to automate the script below. I want to click on a menu item on
> my desktop and have all of these commands get executed sequentially.
> Currently, I paste them in the terminal one by one and I have to enter a
> password three times (where "PASSWORD" is below). Anyone know how to
> automate this deal with the PASSWORDS entered. If it is to be one script, I
> may have to exit (as show below) to do the scp. Anyone?
>
>
> BACKING UP WEB SITE WITH MYSQL DATABASE
>
> ssh user at host.com
> PASSWORD
> mysqldump -h db1.host.com -u user -ppassword user>/home/user/dbbackup.txt
> tar cfvz /home/user/backup.tgz /home/user --exclude backup.tgz
> exit
> scp user at host.com:/home/user/backup.tgz /data/save/code
> PASSWORD
> ssh user at host.com
> PASSWORD
> rm /home/user/dbbackup.txt
> rm /home/user/backup.tgz


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list