Connect via SSH
You can connect to the Mecha Comet remotely from another computer on the same network using the Secure Shell (SSH) protocol. Follow the steps shown below to quickly get connected.
Launch the Terminal
app on your computer (even Windows now has a Terminal app, what a time to be alive!)

Run the below command, this should work out-of-the-box for the Mechanix OS.
$ ssh mecha@mecha-comet.local
Alternatively, if you know the IP address (here) you can run the command below, replacing the <ip address>
placeholder.
$ ssh mecha@<ip address>
The default username and password for your Mecha Comet is mecha
, once connected you maybe asked to change the password.
If you are connecting for the first time, OpenSSH
might throw a warning about the authenticity of the host. Don't worry, OpenSSH
is trying to keep you secure from connecting to unknown hosts.
$ ssh mecha@mecha-comet.local
The authenticity of host '192.168.24.11 (192.168.24.11)' can't be established.
ED25519 key fingerprint is SHA256:xXxyyyZxxxxYYYYxxxzzXXXyyyyyXXZZZxzzxxxxx.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Just enter yes
and proceed 👍
You should now see the prompt on your terminal change to the Comet. You can now start firing away your commands.
mecha@mecha-comet:~$ echo "hello world"
hello world
That's it, you are now connected to your Mecha Comet via SSH 🎉 !
Configure SSH without password
It is recommended to use a Public-Private Key-pair to authenticate while connecting via SSH. This tutorial will help you set up Public Key Authentication for your Comet.
Generate a new keypair On your local machine, open a terminal and run the below command. You can skip this step if you already have a keypair generated (for Github, or any other SSH connections).
$ ssh-keygen -t rsa -b 4096
Never share your private key, always ensure you keep it safe and local to your system.
You'll be prompted to enter the directory where you'd like to store the key pair. If you're happy with the default directory (~/.ssh
), just press Enter
.
$ ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/megamecha/.ssh/id_rsa):
After choosing the key storage directory, you'll be asked to enter a passphrase. This is an extra layer of security, but it's optional. If you don't want to use a passphrase, you can leave it blank.
$ ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/home/megamecha/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
The key generation is an important process. Below is the complete output of the ssh-keygen
command, make special note of the public key
and private key
paths.
$ ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/home/megamecha/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/megamecha/.ssh/id_rsa
Your public key has been saved in /home/megamecha/.ssh/id_rsa.pub
The key fingerprint is:
xXxyyyZxxxxYYYYxxxzzXXXyyyyyXXZZZxzzxxxxx megamecha@mecha-land.local
The key's randomart image is:
...
Copy your new (or existing) public key to the device, use the below command
# To copy all identities in the ~/.ssh
$ ssh-copy-id -i /path/to/pub mecha@<ip address>
# Example
$ ssh-copy-id -i /home/megamecha/.ssh/id_rsa mecha@<ip address>
You'll be prompted to enter your password. Once that's done, your public key will be copied to the server.
Try connecting to the device with the following command:
$ ssh mecha@<ip address>
If everything is set up correctly, you should be logged in without entering your password. That's it! 🎉
Disabling Password Authentication
Once you have successfully set up SSH key-based authentication, you can increase your device security by disabling password authentication. Here's how you can do it.
Login to your Mecha Comet using SSH
$ ssh mecha@<ip address>
Open the SSH daemon configuration file using a text editor of your choice. We'll use nano for this example:
$ sudo nano /etc/ssh/sshd_config
Find the line that says #PasswordAuthentication yes
and change it to PasswordAuthentication no
. If the line doesn't exist, you can add it. Make sure to remove the #
to uncomment the line.
Save and exit the file. In nano, you can do this by pressing Ctrl + X
, then Y
to confirm saving the changes, and then Enter
to confirm the file name.
Restart the SSH service to apply the changes.
$ sudo systemctl restart sshd
Exit the SSH connection (using Ctrl+C
) and try logging in again with SSH. You should be able to log in only with your SSH key, and the server won't accept password authentication.