Although it is certainly possible to enter in any configuration commands directly to the VM's command line console, many users find it easier to SSH (Secure Shell) to the VM and type commands through the command line on their host OS. Below are the steps and commands to access the VM via SSH.
Log into the VM as the
system user with the username and password shown at the top of the VM upon start up.
Now that you're logged in, the SSH keys to access the VM need to be generated. Type the following commands, filling in for the text between the brackets:
mkdir -p .ssh cd .ssh ssh-keygen -f 'emcien' -N '' -t rsa
This should generate two files, a private SSH key with the name that you entered for it, and a public key as well (ending in .pub). Now add the keys that you generated to the VM's list of authorized keys with the command:
cat emcien.pub >> authorized_keys
Now that you have generated the keys, you will need to access them from your host OS. To achieve this, the following commands will place the SSH keys in a place on the VM that you will be able to retrieve from your host OS via SFTP.
sudo mkdir /sftp/transfer/data/keys sudo mv /home/system/.ssh/emcien* /sftp/transfer/data/keys sudo chmod 644 /sftp/transfer/data/keys/*
The keys have now been generated and stored in a place that can be accessed by the host OS, so the last step is to pull them down and SSH to the system via the following commands:
sftp -P 2222 or 22 transfer@localhost (or your hostname)
(transfer password is on login screen) cd keys get *
The keys will now be stored in your working directory on your Host OS. To see where those files are located, type
lpwd. The downloaded private key needs to be changed to be read-only by just your user and unreadable by any other users on your system. On OSX or Linux, the command to run locally is:
The final step is to SSH to the system using this command and the newly downloaded key. Please change the hostname if not using localhost:
ssh -p 2222 -i emcien system@localhost
After a successful SSH connection is established, it is advised that you log into the VM as the system user (as described above) and delete your SSH keys from the directory