I'm migrating some home folders from one Linux box to another using scp. I've saved my public key into the destination box's authorized_keys file and the following command works perfectly when I type it at the command line:

Can you add an echo $HOME to the script? I wonder if the script doesn't have the environment variable to let it know where .ssh is.
–
PaulOct 9 '11 at 11:23

I assume you meant export $HOME - still the same error
–
XoundboyOct 9 '11 at 11:27

I meant "echo" so you could take a look at the value the script thought it was set to. But forcing the issue works just as well. I think it might be time to run verbose logging on the server.
–
PaulOct 9 '11 at 11:57

You could also use the -i parameter on the scp command to make absolutely sure it is sending the right private key, and -v to see if there were any issues with it
–
PaulOct 9 '11 at 11:59