Hardware Reference
In-Depth Information
the terminal on your host. After executing the following command, you will no longer be
prompted for a password:
cat .ssh/id_rsa.pub | ssh bbb 'cat >> .ssh/authorized_keys'
This will copy your public SSH key to the BBB, which will be recognized in the SSH
handshake as an authorized key, and therefore, it will not require you to enter the debian
user's password.
Most likely, you will need to perform this operation again and you may not want to refer
to this topic to find this command. You can add this function to your .bashrc file or an
equivalent for further ease of use:
ssh_upload(){
if [[ $# -ne 1 ]]; then
echo "usage: host\nNOTE: host should be set in ~/.ssh/
config"
else
cat ~/.ssh/id_rsa.pub | ssh $1 'cat >> ~/.ssh/
authorized_keys'
fi
}
Then, you can add your key to servers with:
ssh_upload bbb
Don't forget to reload your .bashrc file to gain this function with:
source ~/.bashrc
Logging out and in again will also work.
Running an SSH agent to control access to your SSH keys
Now you don't have to enter the debian account password each time you log in to the
BBB, but now you do have to enter the password for your SSH private key. This is
equally annoying. However, we can fix this by running ssh-agent . Installing and con-
figuring ssh-agent is OS-dependent, and instructions are easy to find online. Once
ssh-agent is running, you'll typically have to enter your SSH private key password
Search WWH ::




Custom Search