Skip to content

Accessing the device remotely

Assumption: Both devices are on the same network

SSH

SSH using credentials

# Command
$ ssh user@ip_address

# Example
$ ssh pi@192.168.0.1

SSH using key-based authentication

To create your public and private SSH keys on the command-line:

mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa

Your public key is now available at ~/.ssh/id_rsa.pub.

About passphrase

Your SSH key passphrase is only used to protect your private key from thieves. It's never transmitted over the Internet, and the strength of your key has nothing to do with the strength of your passphrase.

Transfer client key to host

ssh-copy-id <username>@<host>

Verifying access

ssh <username>@<host>

Disable password authentication

Look for sshd_config file in the pi, and change the following line.

#PasswordAuthentication yes

to

PasswordAuthentication no

Installing some dependencies

$ sudo apt install -y <package_1>  <package_2> . . .

Last update: April 29, 2024