Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
SUSE / openSUSE This Forum is for the discussion of Suse Linux.


  Search this Thread
Old 05-16-2005, 06:21 AM   #1
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Rep: Reputation: 16
SSH/keychain problem/BASH problem

I use keychain in order to download a web site backup on my desktop at night. For that reason I have added the appropriate commands on ~/.profile, meaning my ~/.profile now, has the following 2 lines:

keychain id_dsa
. ~/.keychain/$HOSTNAME-sh

The backup process runs as a cron job late at night. Unfortunatelly, either the ~/.profile is not the right place to add those lines (The article at IBM's Dev center, mentions the ~/.bash_profile), or the keychain is not working, because the cron jib stops with an "authentication required" mail message.

The keychjain is working, since I can connet passwordless at the remote server from the console. Thus, I have to find the correct place to add the above mentioned 2 lines.

If I add them on the backup script, o na few days the server will stop to respond, since for wach time the script is running a new ssh-agent id is running (and is not closed).
Is it save to add a new file on my home dir named ~/.bash_profile?

The above mentioned problem will be solved if I can "force" cron to load user's settings (either from bashrc, or from bash_profile). Since, no one answered anything, I have to ask something else. When a user logs in (let's say a console), the ~/.basrc file ir read in order to load any changes.
But, (please correct me if I am wrong), when a cron job is running the ~/.barc file is not read. Which file is read? Is it possible to "force" cron to read the bashrc file?

Thank you in advance.

Last edited by tpe; 05-17-2005 at 09:50 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated SCP/SSH using Keychain gareth_western Linux - General 1 10-12-2004 10:43 AM
ssh-agent/keychain problems Killbot_5000 Linux - Security 1 09-18-2004 03:33 AM
using and mounting keychain memory levicc00123 Debian 4 08-08-2004 11:54 AM
Keychain ssh problem (bug????) pcwulf Linux - Security 3 11-27-2003 11:55 PM
sh script in 'keychain' ssh program pcwulf Linux - Software 0 11-27-2003 09:16 PM > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 09:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration