Hardware Reference
In-Depth Information
Add the following section to your ~/.ssh/config file, replacing HostName with the
IP address of your BBB:
Host bbb
User debian
Now, you can SSH into the BBB just by typing ssh bbb . Add as many servers as you
want here and give them descriptive names, and this will you manage your connections.
Configuring password-less login
If you've followed the above step, then connecting to your BBB is now simplified with the
exception of entering the password. Connect to your BBB and run the ssh-keygen
command on BBB. This will create the .ssh directory for you. You don't have to gener-
ate an SSH key; you could just create the .ssh directory, but chances are that you may
need an SSH key anyway and this will accomplish both tasks.
Before you log out, we need to perform one bit of maintenance. We need to regenerate the
SSH host key, the key on the BBB, since the key on your device was cloned from an im-
age. The process involves just a few commands but requires running them as root. You
can either type sudo su and become root and run the commands, or append sudo in
front of each command in the following code snippet, based off the Nix Craft article at ht-
tp://www.cyberciti.biz/faq/howto-regenerate-openssh-host-keys/ :
rm /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
This will delete your existing SSH host key and regenerate it from scratch. Since the host
key has changed, we need to update your SSH client on you main computer. If you log in
to the BBB again, you will probably receive a warning that the fingerprint doesn't match
because you changed it. You can remove the old entry from your client by typing the fol-
lowing (you may have to use the IP address instead of bbb ):
ssh-keygen -R bbb
Alternatively, you can edit ~/.ssh/known_hosts directly and remove the entry.
With the new SSH key on the BBB and the old entry in known_hosts removed, log
back in to the BBB just to make sure everything is working. Log back out and return to
Search WWH ::

Custom Search