4

I would like to use dput to upload a package to a launchpad PPA via sftp. After preparing the data, it all works fine until

please login: To accept ssh-rsa hostkey 6b03de9833252318a646b34722cd54f2 for ppa.launchpad.net type "yes": [yes, no]:

Typing yes does the trick, but is impossible to do as a cronjob.

How to skip the hostkey verification in dput?

Nico Schlömer
  • 589
  • 3
  • 13

1 Answers1

4

dput-ng is using python-paramiko, which is not using the OpenSSH (therefore the ~/.ssh/config changes are not reflected -- out of the question is also the hints to disable strict host key checking when it is your only way to verify you are connecting to the host you think). But it is using the OpenSSH known hosts store, so you should be able to download the server host keys using ssh-keyscan, verify them manually, store them into this store and then connect without any problems:

$ ssh-keyscan ppa.launchpad.net
# ppa.launchpad.net:22 SSH-2.0-Twisted
ppa.launchpad.net ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==

and paste the line to the ~/.ssh/known_hosts. Shortcut:

$ ssh-keyscan ppa.launchpad.net >> ~/.ssh/known_hosts

Then you should be able to connect without any problems.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
Jakuje
  • 20,974
  • 7
  • 51
  • 70