sshpass, scp and feh. Sending files over ssh without prompting for a password
10/07/2017
I got a Raspberry Pi as a webcam/timelapse setup. I thought it would be fun to also send it to my other Pi so it would show up on my desktop.
This how I did it.
First I needed to send the file from the PiCam to the PiDesktop and I use SSH and SCP. The thing is, with SCP you need to enter a password and because we run it in on a cronjob we have a problem.
This is how you can get arround that. Use SSHPASS.
First we need to install sshpass:
1 2 3 4 5 |
wget http://sourceforge.net/projects/sshpass/files/latest/download -O sshpass.tar.gz tar -xvf sshpass.tar.gz cd sshpass-1.06 ./configure sudo make install |
Then you can use it like this:
1 |
sshpass -p 'PASSWORD' scp /home/picam/pictures/lapse.jpg pi@192.168.x.xx:/home/pi/webcam.jpg |
Yeah its not secure. Follow the links to read more about a better approach.
As it arrives on the PiDesktop, FEH will pick it up and sends it to a nice picture windows.
1 |
feh -q --scale-down -R 60 -g 648x356 /home/pi/webcam.jpg |
Sources:
https://www.tecmint.com/sshpass-non-interactive-ssh-login-shell-script-ssh-password/
https://linux.die.net/man/1/feh
https://www.linux.com/learn/cool-linux-command-line-image-management-hacks
This is a better way to connect with SCP and a password:
https://kb.iu.edu/d/aews and https://alvinalexander.com/linux-unix/how-use-scp-without-password-backups-copy
Share the post "sshpass, scp and feh. Sending files over ssh without prompting for a password"
quick mount
20/07/2016
Just a quick way to mount a windows share
1 |
sudo mount -t cifs //IPADDRESS/music /mnt/ -o username=USER,password=PASSWORD |
If you not sure what shares are on the windows machine
1 |
net share |
Share the post "quick mount"
remove splash screen from ubuntu Mate
26/03/2016
I wanted to see the boot text so I needed a way so it always shows the text version instead of the Splash screen.
That splash screen is a a program called plymouth.
You can always push the [esc] button or change Grub:
1 |
sudo nano /etc/default/grub |
Change:
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”
to
GRUB_CMDLINE_LINUX_DEFAULT=””
add:
GRUB_GFXPAYLOAD_LINUX=text
And then:
1 |
sudo update-grub |
Share the post "remove splash screen from ubuntu Mate"
howto install a .deb
18/11/2015
Sometimes you can download a .deb
This it one way to install it:
sudo dpkg -i path/nameofsoftware.deb
then
sudo apt-get install -f
The last will check and fix dependencies of the just installed package (if your lucky).
Share the post "howto install a .deb"

Centos fail2ban error
18/08/2014
With the latest version of Fail2ban I got this error on some Centos servers that Fail2ban would not start anymore.
This is the quick fix:
Add to your jail.conf:
1 2 3 |
[DEFAULT] backend=gamin |
Found the above solution here: https://github.com/fail2ban/fail2ban/issues/44
Share the post "Centos fail2ban error"