SSH Keys

Hi All,

I guess this question has been asked for many times but I did not find an answer.

I need my Linux hosts to have SSH keys ready (so i can deploy chef)

How can i define the authorized keys to the machine will be installed with them?

Thanks :)

4 Replies

You can read about setting up SSH authentication here: https://www.linode.com/docs/security/us … n-with-ssh">https://www.linode.com/docs/security/use-public-key-authentication-with-ssh

adir is probably referring to other cloud providers that allow you to seed a standard image with a known SSH key so that installs (via chef for example) can be automated. Linode doesn't have that functionality specifically but you can easily craft something up yourself using Linode https://linode.com/StackScripts. There are a bunch of community stack scripts available and I'm sure some of them already do what you are looking for but I didn't look carefully.

This script might be a good place to start: https://www.linode.com/stackscripts/view/165

in addition to setting up custom StackScripts to deploy Linodes with keys in place, you could also use the Linode Vagrant provider plugin.

https://linode.com/docs/applications/co … vironments">https://linode.com/docs/applications/configuration-management/vagrant-linode-environments

No need to mess with StackScripts or Vagrant prioviders. You can do this via the Linode API:

https://www.linode.com/api/linode/linod … stribution">https://www.linode.com/api/linode/linode.disk.createfromdistribution

Specifically, the 'rootSSHKey' optional parameter.

-Chris

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct