SSH Connection without Password

Hits: 202

    ~ ssh-copy-id yoursshusername@yourservername.com
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/c/Users/USER/.ssh/id_ed25519.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
sshyoursshusername@yourservername.com's password: <<---HERE IS YOUR SSH PASSWORD QUESTION ONE TIME -->

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'yoursshusername@yourservername.com'"
and check to make sure that only the key(s) you wanted were added.
Continue reading “SSH Connection without Password”

ERROR: for db Cannot start service db:

Hits: 201

Error response from daemon: You cannot remove a running container 03bfa4d8781318d096d8bf91fbe5375c11912ce0f427e2059891cdad7ade25e0. Stop the container before attempting removal or force remove

ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint

Fix Method 1;

docker container ls
docker stop 

Fix Method 2;

docker rm $(docker ps -a -q)

Raspberry Pi Zero W + USB Modem – SMS Gateway

Hits: 693

This Article updated on 08.09.2019

Install usb-modeswitch, smstools, wvdial

sudo apt-get install usb-modeswitch usb-modeswitch-data smstools wvdial

Find right device and baudrate with this command;

sudo wvdialconf

…my modem information (modem on ttyUSB1 and baudrate 9600)…

ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyUSB1<*1>: ATQ0 V1 E1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- ERROR
ttyUSB1<*1>: ATQ0 V1 E1 &C1 -- ERROR
ttyUSB1<*1>: ATQ0 V1 E1 &D2 -- ERROR
ttyUSB1<*1>: ATQ0 V1 E1 +FCLASS=0 -- OK
ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer: ZTE INCORPORATED
ttyUSB1<*1>: Speed 9600: AT -- OK
ttyUSB1<*1>: Max speed is 9600; that should be safe.
ttyUSB1<*1>: ATQ0 V1 E1 +FCLASS=0 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB2<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyUSB3<*1>: ATQ0 V1 E1 -- OK
ttyUSB3<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB3<*1>: ATQ0 V1 E1 S0=0 -- ERROR
ttyUSB3<*1>: ATQ0 V1 E1 &C1 -- ERROR
ttyUSB3<*1>: ATQ0 V1 E1 &D2 -- ERROR
ttyUSB3<*1>: ATQ0 V1 E1 +FCLASS=0 -- OK
ttyUSB3<*1>: Modem Identifier: ATI -- Manufacturer: ZTE INCORPORATED
ttyUSB3<*1>: Speed 9600: AT -- OK
ttyUSB3<*1>: Max speed is 9600; that should be safe.
ttyUSB3<*1>: ATQ0 V1 E1 +FCLASS=0 -- OK

Found a modem on /dev/ttyUSB1.
Modem configuration written to /etc/wvdial.conf.
ttyUSB1<Info>: Speed 9600; init "ATQ0 V1 E1 +FCLASS=0"
ttyUSB3<Info>: Speed 9600; init "ATQ0 V1 E1 +FCLASS=0"

Modify your smsd.conf

sudo nano /etc/smsd.conf

my smsd.conf with founded Modem information like:

devices = GSM1
outgoing = /var/www/sms/outbox
checked = /var/www/sms/checked
incoming = /var/www/sms/inbox
logfile = /var/log/smstools/smsd.log
infofile = /var/run/smstools/smsd.working
pidfile = /var/run/smstools/smsd.pid
outgoing = /var/www/sms/outbox

checked = /var/www/sms/checked
failed = /var/www/sms/error
incoming = /var/www/sms/inbox
sent = /var/www/sms/sent
stats = /var/log/smstools/smsd_stats

[GSM1]
#init =
device = /dev/ttyUSB1
incoming = yes
pin = 1234
baudrate = 9600

Create Directory for SMS Sending

sudo mkdir /var/www/sms
sudo mkdir /var/www/sms/inbox
sudo mkdir /var/www/sms/outbox
sudo mkdir /var/www/sms/error
sudo mkdir /var/www/sms/sent
sudo mkdir /var/www/sms/checked
sudo chmod -R 0777 /var/www/sms/

Restart then smstools3

sudo /etc/init.d/smstools restart

For Testing Create a file under /var/spool/sms/outgoing/ Folder. I create like:

echo -e "To: 00491111111111\n\nTest SMS" > /var/www/sms/outbox/testsms.txt

Server configuration and php works coming soon!

sudo mkdir /var/www/sms
sudo mkdir /var/www/sms/inbox
sudo mkdir /var/www/sms/outbox
sudo mkdir /var/www/sms/error
sudo mkdir /var/www/sms/sent
sudo mkdir /var/www/sms/checked
sudo chmod -R 0777 /var/www/sms/