Thanks for taking the time to respond.
My key is pass-phrased and I'm thinking that .keychain is taking care of that for me with this line:
Code:
source /mnt/hdb1/home/user1/.keychain/little-sh
Is this debug info an indicator of the same thing that you suggested? Or not?
Code:
SH_AUTH_SOCK=/tmp/ssh-TZIHuv7388/agent.7388; export SSH_AUTH_SOCK;
++ SSH_AUTH_SOCK=/tmp/ssh-TZIHuv7388/agent.7388
++ export SSH_AUTH_SOCK
The fact that I get results back (the word "Linux" in this case) from the remote machine leads me to think that the key part is working correctly, but maybe I mis-understand what you're trying to tell me.
My reason for using the {something} notation is that it seems like I have better results in capturing my output to logs. For example this gets the word Linux in my log file:
Code:
{
Hostos_via_ssh=$(ssh $Remote uname)
echo "$Hostos_via_ssh"
} >> $Log_file
But this doesn't:
Code:
Hostos_via_ssh=$(ssh $Remote uname)
echo "$Hostos_via_ssh" >> $Log_file
And it seems more efficient, easier to read, etc., when I redirect the whole block.
Overall my goal is to backup my local machine to a remote machine using dar over ssh. This is a small snippet, just big enough to demonstrate the problem. Since I'm learning, I am redirecting every section of the script to a log file as it makes it easier for me to troubleshoot. Probably this could be done faster and easier if I would use some existing scripts that can be found on the www but I'm using this as a learning exercise as well as having practical value.