make scp more script-capable

Rachit Siamwalla rachit at ensim.com
Tue Jun 19 05:45:27 EST 2001


i believe changing ssh_config "BatchMode yes" would fix that problem.

BatchMode is designed for use in scripts, if a question needs to be asked,
it will fail.

-rchit

-----Original Message-----
From: Alexander Kurz [mailto:alexander.kurz at qsc.de]
Sent: Monday, June 18, 2001 7:39 AM
To: openssh-unix-dev at mindrot.org
Subject: make scp more script-capable


Hi,
 here's a proposal of a new ssh/scp-feature:
 -------------------------------------------------------
 please implement a timeout with non-zero error-returncode on 
 "Are you sure you want to continue connecting (yes/no)?"
 -------------------------------------------------------

My situation:
 recently I have implemented a cronjob
 that is using scp. Due to organizational
 reasons, the hostname of the remote
 machine changed. The problem that came up
 at this point, is this the message came up:

akurz at dev157-34:~ > ssh someuser at somehost.mydomanin.de
The authenticity of host 'someuser at somehost.mydomanin.de' can't be
established.
RSA key fingerprint is 00:12:4a:fc:33:80:71:70:4b:bb:e4:9d:16:c7:30:62.
Are you sure you want to continue connecting (yes/no)? 

BUT: i did not see the message, becaus i have
 discarded it via
 scp someuser at somehost.mydomanin.de:~/somefiles* . >/dev/null
 So the script hung whithout complaining.
 If there was some timeout-functionality,
 i could easily check scp's returncode and
 create a nice error-message

 regards, Alexander Kurz,   akur at qsc.de



More information about the openssh-unix-dev mailing list