SSH to your robot
Overview
Robots are commonly deployed behind NAT devices. These devices restrict the methods that can be used to access the robot. Notably, you cannot dial directly into the robot since it does not have a static, global address and port. The primary goal of this feature is to provide a mechanism that allows you to connect via SSH directly to your robot running the Formant agent.
Port forwarding enables the following:
Secure file transfer using sftp
Secure copy using scp
Connect visual tools like rviz from your desktop directly to the remote robot
Forward any port from your robot to your local machine
Create on the fly VPN using SSH-VPN
Step 1: Verify ~/.ssh/config file
fctl adds the following to the top of your ~/.ssh/config file. Verify that the following exists in your ~/.ssh/config file. If not, add it to the top of the file.
Mac/Linux:
Host *.formant ProxyCommand fctl port-forward $(echo %h | sed "s/\.formant$//") -r 127.0.0.1 -p %p
Docker:
Host *.formant ProxyCommand docker run -i -a stderr -a stdin -a stdout --rm -v <permanent_storage>:/root/.formant formant/fctl port-forward $(echo %h | sed "s/\.formant$//") -r 127.0.0.1 -p %p
This attaches STDIN, STDOUT, and STDERR to the container which is necessary for SSH ProxyCommand, as well as removing the container with --rm when exiting.
Step 2: SSH
$ ssh <device_name>.formant