|
Joyent's Smart Machines and Linux Virtual Machines uses SSH keys as the primary method of accessing the servers. About SSH KeysIn order to access a newly purchased machine from the new Joyent Cloud portal, you need an SSH key. However, you can modify the machine after accessing it with your SSH key to revert to the former method (login name / password) if you prefer. You may also build this credentialing information into custom scripts to be accessed through the Joyent Cloud Public API to make those changes on provisioning. Where to find your SSH keyThe default location of your SSH key on your local machine at ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub.
If neither of those files exist, create them with this command: To view your public key from the command line, use this command:
Adding more SSH Keys on SmartMachinesOnce you have your initial key uploaded to your Joyent Cloud account, you can add more keys from other computers to your SmartMachine. Any SSH keys added to your Joyent Cloud account will allow access to all of your Joyent Cloud SmartMachines. To provide access to a single machine, generate the key on the new computer and add it to the following location on the SmartMachine: Keys associated with your Joyent Cloud account will be used to access any SmartMachine you create. Keys added on a single machine will only allow access to that single machine. The keys in your Joyent Cloud account allow SSH access to the admin and root POSIX user accounts. Disabling SmartLogin on a SmartMachine
SmartLogin is a plugin to the ssh that allows a live lookup of your SSH key from your Joyent Cloud account via the API. With SmartLogin enabled, whenever you attempt to SSH into a SmartMachine, SmartLogin will check your Joyent Cloud account for a matching public key. If a key is not found, it will then revert to the standard behaviour of looking for the public key in the .ssh/authorized_keys file of specified user. Although SSH keys are the more secure, you may prefer access your SmartMachines via username and password. You can disable the SmartLogin plugin and the live ssh key lookup on any given SmartMachine by commenting out (with a '#') or removing the following in the /etc/ssh/sshd_config file: Once that line has been commented out, you will need to restart the ssh service: SmartLogin should now be disabled.
Changing SSH Key on a Virtual MachineIf you change your SSH key on your local computer you will need to log into your Virtual Machine with your old key first. Then you need to add your new key and remove your old key from: |
At a Glance
Joyent SmartMachines and Virtual Machines use SSH keys to control access. For more information on SSH keys more generally see the SSH Guide. |