Friday, December 28, 2018

SSH on rasperry pi

rasperry.md

SSH on rasperry pie

Enable ssh on rasperry pie

For the first time

Open terminal

  1. Type raspi-config
  2. Choose Interfacing Options
  3. Select SSH
  4. Choose Yes
  5. Select Ok
  6. Choose Finish

After the first time you can enable and disable if by terminal type following

sudo systemctl enable ssh sudo systemctl start ssh

Use ssh key on login

On client

Generate key

ssh-keygen

check the key

cat ~/.ssh/id_rsa.pub ssh-rsa <REALLY LONG STRING OF RANDOM CHARACTERS> user@host

copy key to rasperry

ssh-copy-id <USERNAME>@<IP-ADDRESS>

Copy files with scp

copy from rasperry to local

scp pi@192.0.0.0:<path to file> . scp pi@192.0.0.0:/home/pi/history.txt .

copy to Rasperry pi

scp <path to local file> pi@192.0.0.0:<path to remote> scp history.txt pi@192.0.0.0:/home/pi/

No comments:

Post a Comment