Making sure that your connectd daemons are running

In order for you to be able to connect to a device using remote.it, connectd daemons need to be running on your device.  After you run connectd_installer, it is expected that several daemons corresponding to your remote.it Services will be running.

For example, suppose you just ran connectd_installer and added a Device Name and a Service for SSH.

Determining whether your connectd daemons are running

Run the following command on your device's console.

ps ax | grep connectd | grep -v grep

This is the expected output:

pi@raspberrypi:~ $ ps ax | grep connectd | grep -v grep
1772 ? S 0:01 /usr/bin/connectd.arm-linaro-pi -f /etc/connectd/services/Connectdrmt365535.conf -d /var/run/Connectdrmt365535.pid
1790 ? S 0:00 /usr/bin/connectd_schannel.arm-linaro-pi -f /etc/connectd/schannel.conf -d /var/run/connectd_schannel.arm-linaro-pi.pid
2230 ? S 0:01 /usr/bin/connectd.arm-linaro-pi -f /etc/connectd/services/Connectdssh22.conf -d /var/run/Connectdssh22.pid
pi@raspberrypi:~ $

There are two entries which include: connectd.arm-linaro-pi.  This daemon is used for each Service.  You will see the option "-f /etc/connectd/services/Connectdrmt365535.conf" which is a reference to the provisioning file used for this Service. 

Note that the "Device Name" uses a connectd daemon even though you never actually use it to connect to a server on your device.

There should also be a single entry, regardless of how many services you have installed, for connectd_schannel.arm-linaro-pi.  This daemon is used by the Bulk Scripting feature.

Connectdrmt365535.conf is the provisioning file for the Bulk Service which provides the Device Name.  The Bulk Service is also used for Bulk Scripting.

Connectdssh22.conf is the provisioning file for the SSH Service on port 22. 

In general, each Service you add using connectd_installer adds a provisioning file in /etc/connectd/services.

Stopping and starting individual Services

Each Service which you add using the connectd_installer script also adds a start/stop/restart script in /usr/bin.  To find them, run this command:

ls -l /usr/bin/Connectd*


pi@raspberrypi:~ $ ls -l /usr/bin/Connectd*
-rwxr-xr-x 1 root root 2155 Nov 15 17:56 /usr/bin/Connectdrmt365535
-rwxr-xr-x 1 root root 2151 Nov 15 17:57 /usr/bin/Connectdssh22
pi@raspberrypi:~ $

This shows that you have start/stop/restart scripts for your Bulk and SSH services.

In order to stop a single Service, for example the SSH Service, first (very important!) make sure you are not currently using it to connect to your device.  So, let's suppose that you are connected to your device using a keyboard and monitor or using SSH over the LAN.

To stop the remote.it SSH Service:

sudo Connectdssh22 stop
pi@raspberrypi:~ $ sudo Connectdssh22 stop
Connectd daemon start/stop script Version: 2.3.17
Stopping Connectdssh22...
pi@raspberrypi:~ $

Warning

Make sure you don't stop the remote.it SSH Service while you are using it, or you will lose connection and not be able to reconnect remotely!  The same warning applies for a VNC Service.

To start the remote.it SSH Service:

sudo Connectdssh22 start
pi@raspberrypi:~ $ sudo Connectdssh22 start
Connectd daemon start/stop script Version: 2.3.17
Starting Connectdssh22...
Connectd built Jan 7 2019 at 17:11:41 Now Starting Up
Version 4.5 - (c)2019 remot3.it, Inc. All Rights Reserved
Built with ALIGN BCASTER MALLOC_POOL LINUX RESOLVE BIGBUF BACKTRACE pool=524288
Raspberry Pi Version
config file /etc/connectd/services/Connectdssh22.conf
Starting up as daemon
PID file specified as /var/run/Connectdssh22.pid
setting web config port to dest_server_port 80
primary local ip = 192.168.1.70
pi@raspberrypi:~ $

To restart the remote.it SSH Service:

sudo Connectdssh22 restart
pi@raspberrypi:~ $ sudo Connectdssh22 restart
Connectd daemon start/stop script Version: 2.3.17
Stopping Connectdssh22...
Starting Connectdssh22...
Connectd built Jan 7 2019 at 17:11:41 Now Starting Up
Version 4.5 - (c)2019 remot3.it, Inc. All Rights Reserved
Built with ALIGN BCASTER MALLOC_POOL LINUX RESOLVE BIGBUF BACKTRACE pool=524288
Raspberry Pi Version
config file /etc/connectd/services/Connectdssh22.conf
Starting up as daemon
PID file specified as /var/run/Connectdssh22.pid
setting web config port to dest_server_port 80
primary local ip = 192.168.1.70
pi@raspberrypi:~ $

Restarting the daemon for a specific remote.it Service just calls a "stop" followed by "start".

The connectd start/stop/restart scripts do not do anything to the underlying service such as an SSH or VNC server.

Stopping or starting all configured services with a single command

To stop all configured connectd daemons:

sudo connectd_stop_all
pi@raspberrypi:~ $ sudo connectd_stop_all
Connectd daemon start/stop script Version: 2.3.17
Stopping Connectdrmt365535...
Connectd daemon start/stop script Version: 2.3.17
Stopping Connectdssh22...
remote.it server channel daemon start/stop script Version: 2.3.17
Stopping connectd_schannel.arm-linaro-pi...
pi@raspberrypi:~ $

To start all configured connectd daemons, run:

pi@raspberrypi:~ $ sudo connectd_start_all
Connectd daemon start/stop script Version: 2.3.17
Starting Connectdrmt365535...
Connectd built Jan 7 2019 at 17:11:41 Now Starting Up
Version 4.5 - (c)2019 remot3.it, Inc. All Rights Reserved
Built with ALIGN BCASTER MALLOC_POOL LINUX RESOLVE BIGBUF BACKTRACE pool=524288
Raspberry Pi Version
config file /etc/connectd/services/Connectdrmt365535.conf
Starting up as daemon
PID file specified as /var/run/Connectdrmt365535.pid
setting web config port to dest_server_port 80
primary local ip = 192.168.1.70
remote.it server channel daemon start/stop script Version: 2.3.17
Starting connectd_schannel.arm-linaro-pi...
server_channel_handler built Jan 7 2019 at 16:56:32
Version 0.5 - (c)2019 remot3.it, Inc. All Rights Reserved
Starting up as daemon
Connectd daemon start/stop script Version: 2.3.17
Starting Connectdssh22...
Connectd built Jan 7 2019 at 17:11:41 Now Starting Up
Version 4.5 - (c)2019 remot3.it, Inc. All Rights Reserved
Built with ALIGN BCASTER MALLOC_POOL LINUX RESOLVE BIGBUF BACKTRACE pool=524288
Raspberry Pi Version
config file /etc/connectd/services/Connectdssh22.conf
Starting up as daemon
PID file specified as /var/run/Connectdssh22.pid
setting web config port to dest_server_port 80
primary local ip = 192.168.1.70
Connectd daemon start/stop script Version: 2.3.17
Starting Connectdvnc5900...
Connectd built Jan 7 2019 at 17:11:41 Now Starting Up
Version 4.5 - (c)2019 remot3.it, Inc. All Rights Reserved
Built with ALIGN BCASTER MALLOC_POOL LINUX RESOLVE BIGBUF BACKTRACE pool=524288
Raspberry Pi Version
config file /etc/connectd/services/Connectdvnc5900.conf
Starting up as daemon
PID file specified as /var/run/Connectdvnc5900.pid
setting web config port to dest_server_port 80
primary local ip = 192.168.1.70
pi@raspberrypi:~ $

Warning

Make sure you don't stop all remote.it Services while you are using one of them, such as SSH or VNC -  you will lose connection and not be able to reconnect remotely!

How the connectd daemons are started at boot time

In connectd package version 2.3.17 and earlier, the following entry in your root crontab causes the cron scheduling daemon to call the connectd_start_all script at boot time.

@reboot /usr/bin/connectd_start_all

You can check the contents of your root crontab by running:

sudo crontab -l

You can edit your root crontab by running:

sudo crontab -e

 Versions of the connectd package after 2.3.17 use systemd services for startup and shutdown.

To check the startup status, run the following two commands:

sudo systemctl is-enabled connectd
sudo systemctl is-enabled connectd_schannel
pi@raspberrypi:~ $ sudo systemctl is-enabled connectd
enabled
pi@raspberrypi:~ $ sudo systemctl is-enabled connectd_schannel
enabled
pi@raspberrypi:~ $

To disable startup:

sudo systemctl disable connectd
sudo systemctl disable connectd_schannel
pi@raspberrypi:~ $ sudo systemctl disable connectd
Removed /etc/systemd/system/multi-user.target.wants/connectd.service.
pi@raspberrypi:~ $ sudo systemctl disable connectd_schannel
Removed /etc/systemd/system/multi-user.target.wants/connectd_schannel.service.
pi@raspberrypi:~ $

To enable startup:

sudo systemctl enable connectd
sudo systemctl enable connectd_schannel
pi@raspberrypi:~ $ sudo systemctl enable connectd
Created symlink /etc/systemd/system/multi-user.target.wants/connectd.service → /lib/systemd/system/connectd.service.
pi@raspberrypi:~ $ sudo systemctl enable connectd_schannel
Created symlink /etc/systemd/system/multi-user.target.wants/connectd_schannel.service → /lib/systemd/system/connectd_schannel.service.
pi@raspberrypi:~ $

 

Was this article helpful?
0 out of 0 found this helpful