Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to store the password for ssh in ksh ??? Help ... 1

Status
Not open for further replies.

h3nd

Programmer
Jul 1, 2006
147
AU
Hi guys,

my script has to run accross the server to modify the file...

So I have to ssh across and input the password, for some reason the ssh-keygen didnt work. I'm not sure why ...

So, is there any way to put the password in my script when I ssh accross ?

Thx guys
 
If the config is the default for the server, ssh keys should work.
One problem could be directory permissions.
I often had users changing permissions within their home directories which causes ssh key exchange to stop working.
Basically the home directory itself should be 750
~/.ssh should be 700

I noticed that some of the directories you listed above are group writable (-rw-rw-r--)
Make user group has no write access and world had no access (if possible in your environment)

NB. These apply to the server you are connecting to...


"If you always do what you've always done, you will always be where you've always been."
 
Hi

I found the problem.

I have to change the home directory permission to 700 or without any write permission as well for .ssh directory.

But I can't do that because I need the group write permission in the home directory to archive the data using different logon.

Thanks guys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top