Skip to contentSkip to conversation

fetch2/sftp: Set BatchMode=yes as argument to sftp

PATCH New Olof Johansson 1 participant 1 message Jul 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2/sftp: Set BatchMode=yes as argument to sftp

Set BatchMode=yes instead of PasswordAuthentication=no. This will make sftp fail immediately, not only when SSH requires interactive authentication, but also on errors related to host key verifcation.

---
 lib/bb/fetch2/sftp.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/sftp.py +1 -1
index 8ea4ef2..cb2f753 100644
@@ -99,7 +99,7 @@ class SFTP(FetchMethod):
         """Fetch urls"""
 
         urlo = URI(ud.url)
-        basecmd = 'sftp -oPasswordAuthentication=no'
+        basecmd = 'sftp -oBatchMode=yes'
         port = ''
         if urlo.port:
             port = '-P %d' % urlo.port
Signature · 1 line
2.1.4