This procedure currently supports clients on Mac OS/X and Linux on x86 processors
Please note: we've heard there are issues with OS/X El Capitan (newest Mac OS).
You can use this script to make direct SSH connections from a command line terminal on your Mac OS/X or Linux x86 computer to an SSH host (ex. Raspberry Pi). This eliminates the need to manually login at https://remot3.it to generate a hostname and port to use with your ssh client. No more copy/paste and copy/paste!
This is an update to the script described here. It is offered primarily to show the use of API calls and the client mode of the daemon. The latest update to the script no longer saves credentials as clear text. The security key is stored as an "Auth Hash".
If you prefer not to cache this, just change the following line:
From:
SAVE_AUTH=1
To:
SAVE_AUTH=0
Then you will need to enter your remot3.it username and password each time you run the script.
Changes:
1) Caches your auth hash instead of username and password
2) Caches the port assignment for each device -as a result, multiple simultaneous connections are possible without overlapping ports
3) Caches the Device List for your account
4) Uses the device name instead of UID
5) Allows display of your device list including current status for each connection
Initially, the script may take longer to connect to your device as it is logging into remot3.it's servers to get the device list. When you connect to a new device, you may get warnings from the SSH client. Follow the instructions shown in the warning message to run ssh-keygen for each new connection to add it to the known_hosts file. Run the script again and you will be able to log in to your SSH server. Subsequent logins will go faster.
Download the remot3.it connectd daemon
Get the connectd daemon that matches your platform here:
To download a file, you must click on the highlighted link on the file name and then click on the "Download" button on the page which appears.

Use connectd.macosx for Mac OS/X.
Use connectd.pi for Raspberry Pi.
Use connectd.i686 for 64-bit Linux on Intel/ARM CPUs.
Copy this file from the download location to /usr/bin and name it weavedConnectd, e.g.
sudo cp weavedConnectd.macosx /usr/bin/weavedConnectd
Make it executable:
sudo chmod +x /usr/bin/weavedConnectd
If sudo asks for your password, give it your Mac or Linux account login password, not your remot3.it password.
Download launcher scripts
Now go to this folder at Github:
and download the lib.sh and sshw.sh scripts to your computer.
Make them executable using:
chmod +x lib.sh sshw.sh
=====================================================================
Example: Start a direct ssh connection from a client (Linux x86 or Mac OS/X)
You'll need:
- Your remot3.it account username and password.
- The remot3.it Device Name
- Your ssh login name and password
./sshw.sh [SSH_NAME]@[DEVICENAME]
e.g.
./sshw.sh pi@Raspberry-Pi-ssh
Debugging your connection
Verbose output (which can be useful for debugging any issues you may encounter) can be enabled by adding 1 or two "-v" right after the script name on the command line:
./sshw.sh -v pi@Raspberry-Pi-ssh
or
./sshw.sh -v -v pi@Raspberry-Pi-ssh
(better for debugging login issues).
Manual Pages
Get a full description of command line options and how the script works:
./sshw.sh -m | less
Known Issues
1) Some combinations of client and server router equipment may prevent a direct connection using this approach. Proxy-type connections (through the web portal) should work.