1820590 Members
2036 Online
109626 Solutions
New Discussion юеВ

scp without password

 
SOLVED
Go to solution
steven chang_1
Regular Advisor

scp without password

hello :

I am trying to scp from solaris 8 to redhat 8, and openssh version running on solaris 8 is
OpenSSH_3.6.1p1 redhat 8 is OpenSSH_3.4p1,

I generate the public/private key for solaris and ftp the id_dsa to redhat and use the id_dsa.pub to generate authority_keys file to redhat 8 . I already put ssh-agent start script in the .profile on the solaris 8 and auto give the passphrase through ssh-add,
but I need update ssh-add pass phrase every time when I login the solaris. Now I want to write a script to scp a tar file from redhat 8.

How can I auto give the passprase with interactive giving through the terminal input.That is how can writing a script to scp with giving any imformation and run this script in the crontab. Thank you very much


steven chang
steven
5 REPLIES 5
Mark Grant
Honored Contributor
Solution

Re: scp without password

Have a look here, it might work for you.
http://www.mail-archive.com/ssh%40clinet.fi/msg04511.html
Never preceed any demonstration with anything more predictive than "watch this"
steven chang_1
Regular Advisor

Re: scp without password

If I let the pass pharse empty when generating the public/private key , my goal would be achieved.


steven chang
steven
Alexander Chuzhoy
Honored Contributor

Re: scp without password

run
ssh-keygen on Solaris. Then when prompted for password just press enter.By default the public key file is saved under ~/.ssh/id_rsa.pub

copy that file to redhat and place it content
in /root/.ssh/authorized_keys (to be able to ssh/scp as root)
like for example
less id_rsa.pub >> /root/.ssh/authorized_keys


Best Regards..
Olivier Drouin
Trusted Contributor

Re: scp without password

Alexander : it looks like he want to use the agent.
Steven E. Protter
Exalted Contributor

Re: scp without password

This doc will help.

The X stuff can be replaced with the cat >> command

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com