1830045 Members
15266 Online
109998 Solutions
New Discussion

scp command

 
Krishna Prasad
Trusted Contributor

scp command

I need to setup a script that will copy files from on machine to another via cron. I want to use the security of scp/ssh instead of rcp. I wan't this to be automatic with no passwords needing to be supplied.

I have generated the idenity keys and renamed idenity.pub to authorized_keys. I use the following command.

scp -rpBq /local.filename login@host:/remote.filename

I get the following error message.

You have not controlling loss connection.
Positive Results requires Positive Thinking
3 REPLIES 3
Gabor Kelecsenyi
Occasional Advisor

Re: scp command

Have you tried it online?
Use option -v.
It works for me only with option -rp.
Krishna Prasad
Trusted Contributor

Re: scp command

Sorry about the previous error message. It somehow got cut off.

The error message is
You have not controlling tty?

I have used the -v option and it looks like it is ignoring the -B option?
Positive Results requires Positive Thinking
Krishna Prasad
Trusted Contributor

Re: scp command

I found out what my problem was...

I have to put the idenity.pub file as authorized_keys on the remote host.
Positive Results requires Positive Thinking