travis-build icon indicating copy to clipboard operation
travis-build copied to clipboard

Enhance ssh_known_hosts addon to accept pre-set host key

Open BanzaiMan opened this issue 7 years ago • 3 comments
trafficstars

Improve ssh_known_hosts to accept hashes of the form:

host: foo.example.com
type: ssh-rsa
key:  AAAAC3NzaC1lZDI1NTE5AAAAIOd6AtszfjD3nI7WvvnN+B39XsrjPzAMCByYO1hwUGf9

and add this to $HOME/.ssh/known_hosts instead of running ssh-keyscan on the given host.

Resolves https://github.com/travis-ci/docs-travis-ci-com/issues/1649.

BanzaiMan avatar Feb 06 '18 21:02 BanzaiMan

Test 1 (with a hash in an array): https://staging.travis-ci.org/BanzaiMan/travis_staging_test/builds/711451#L415 Test 2 (with a bare array): https://staging.travis-ci.org/BanzaiMan/travis_staging_test/builds/711453#L415

BanzaiMan avatar Feb 06 '18 21:02 BanzaiMan

Docs are ready to be unreverted when this is merged in, over on https://github.com/travis-ci/docs-travis-ci-com/commit/517af1b8d6c204ee5c13654e09d6e8f8f77d908c :-/

Sorry again @BanzaiMan

plaindocs avatar Feb 13 '18 14:02 plaindocs

@plaindocs No worries!

BanzaiMan avatar Feb 13 '18 14:02 BanzaiMan