Cannot use ssh-keyscan with $TRAVIS_SSH_KEY_TYPES

I would like to use an environment variable for my server IP for when I SSH into it to deploy my application. So, I initially used the ssh_known_hosts add-on, but that is run before the environment variables are set in the build, so I would have to hard-code the IP. So, I simply copied the output from the command in my build log (which can be seen here), and set it to run manually. However, it seems as though this does not work because the $TRAVIS_SSH_KEY_TYPES environment variable that the add-on was using does not exist (which can be seen here).

How can I fix this command so that it works? Or if there is a better way to use an environment variable for this task I would be happy to use a different method. Thanks!

This variable is set by the ssh_known_hosts addon and is thus only present if it’s being used.

You don’t really need that variable, you can use whatever command and syntax works for you.

Imprint