Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSH key to account #60

Closed
petems opened this issue Aug 15, 2013 · 1 comment · Fixed by #64
Closed

Add SSH key to account #60

petems opened this issue Aug 15, 2013 · 1 comment · Fixed by #64

Comments

@petems
Copy link
Owner

petems commented Aug 15, 2013

Something like tugboat keys add ~/.ssh/awesome_key.pub

From the API

Add SSH Key
This method allows you to add a new public SSH key to your account.

Request URL:
https://api.digitalocean.com/ssh_keys/new/?name=[ssh_key_name]&ssh_pub_key=[ssh_public_key]client_id=[your_client_id]&api_key=[your_api_key]
Parameters
name Required, String, the name you want to give this SSH key.
ssh_key_pub Required, String, the actual public SSH key.
Sample Response
{
  "status": "OK",
  "ssh_key": {
    "id": 47,
    "name": "my_key",
    "ssh_pub_key": "ssh-dss AAAAB3NzaC1kc3MAAACBAK5uLwicCrFEpaVKBzkWxC7RQn+smg5ZQb5keh9RQKo8AszFTol5npgUAr0JWmqKIHv7nof0HndO86x9iIqNjq3vrz9CIVcFfZM7poKBJZ27Hv3v0fmSKfAc6eGdx8eM9UkZe1gzcLXK8UP2HaeY1Y4LlaHXS5tPi/dXooFVgiA7AAAAFQCQl6LZo/VYB9VgPEZzOmsmQevnswAAAIBCNKGsVP5eZ+IJklXheUyzyuL75i04OOtEGW6MO5TymKMwTZlU9r4ukuwxty+T9Ot2LqlNRnLSPQUjb0vplasZ8Ix45JOpRbuSvPovryn7rvS7//klu9hIkFAAQ/AZfGTw+696EjFBg4F5tN6MGMA6KrTQVLXeuYcZeRXwE5t5lwAAAIEAl2xYh098bozJUANQ82DiZznjHc5FW76Xm1apEqsZtVRFuh3V9nc7QNcBekhmHp5Z0sHthXCm1XqnFbkRCdFlX02NpgtNs7OcKpaJP47N8C+C/Yrf8qK/Wt3fExrL2ZLX5XD2tiotugSkwZJMW5Bv0mtjrNt0Q7P45rZjNNTag2c= user@host"
  }
}
@petems
Copy link
Owner Author

petems commented Sep 4, 2013

Not to toot our own horns, but this was super easy to implement, thanks to the middleware and the way the tests are setup 👍

Will open a PR soon, sneak preview at https://github.com/pearkes/tugboat/tree/pm_upload_ssh_key

@petems petems mentioned this issue Sep 7, 2013
@petems petems closed this as completed in #64 Oct 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant