ServerMania logo

Get List of SSH Keys

To see all the SSH keys in the cloud, use the following request:

GET /settings/ssh_keys.xml
GET /settings/ssh_keys.json

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://test/settings/ssh_keys.xml

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://test/settings/ssh_keys.json

XML Output Example:

<ssh_keys type="array">
<ssh_key>
<created_at type="datetime">2011-09-13T16:10:02Z</created_at>
<updated_at type="datetime">2011-09-13T16:10:02Z</updated_at>
<id type="integer">3</id>
<user_id type="integer">1</user_id>
<key>ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqzsLk+oPP9Qxz0Xgpqoe9DqNV7Qe3+oig/o6Ubt30Yh+Zarf8NXctqqeamC1KrlMt12d0AWd38dZ0CU6Eru/2ciwzz2IB0MLrTyjfLCNe2CW64uNjhSS1SH6gSjJUYwHSi7jUBl0vlGtJ7jswBdhgaKkjk1vXH3YFLTHPuKU+pc=user@test
</key>
</ssh_key>
</ssh_keys>


Where:

ssh_key – an array which displays the key info

id – the SSH key ID

user_id – ID of the user to whom the key belongs

key – SSH key