SSH on rasperry pie
Enable ssh on rasperry pie
For the first time
Open terminal
- Type raspi-config
- Choose Interfacing Options
- Select SSH
- Choose Yes
- Select Ok
- 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