Change root password : sudo passwd root
Recent Raspbian disabled SSH by default.
If you want to enable SSH, all you need to do is to put a file called ssh
in the /boot/
directory.
Default user / password : pi
/ raspberry
Install VNC with
sudo apt update sudo apt install realvnc-vnc-server
You can enable VNC Server with
sudo raspi-config
Navigate to Interface Options and select VNC > Yes
Launch sudo raspi-config
Select Interface Options > Resolution
and select a lower resolution. And reboot.
Execute sudo mkdir /mnt/<LOCALDIRECTORY>
: Change <LOCALDIRECTORY >
with your folder name.
Execute sudo nano /etc/fstab
and add :
//<IPADRRESS>/<DIRECTORY> /mnt/<LOCALDIRECTORY> cifs user=<USERNAME>,pass=<PASSWORD>,uid=<UID>,x-systemd.automount 0 0
Get user uid: id -u <username>
Default: pi username.
Mount folder sudo mount -a
Gzip backup command line. Backup time may take time. About 1 hour for a 32GB card
sudo dd bs=4M if=/dev/<DEVICEID> | gzip > /<LOCALORMOUNTFOLDER>/<BACKUPNAME>.img.gz
Default SD CARD DEVICE ID : mmcblk0
/!\ Require sendmail
.
- Create a new folder in
/usr
sudo mkdir /usr/custom
- Create a new script
sudo touch /usr/custom/ssh_alert.sh
- Change permissions
sudo chmod 0700 /usr/custom/ssh_alert.sh && chown root:root /usr/custom/ssh_alert.sh
- Use your favorite editor to edit the file and copy and paste this file ssh_alert.sh
- Final step - add this line at the end of
/etc/pam.d/sshd
session required pam_exec.so /usr/custom/ssh_alert.sh