Connecting over SSH
This tutorial was documented in a standard Ubuntu 16.04 environment
This tutorial assumes that you have already been able to connect to the OcPoC via GTKTerminal. If you are unfamiliar with this process it is documented here under 'Connecting to your OcPoC™ for the first time'.
Before you begin:
- Provide power to your board.
- Connect your board to a host PC via USB.
- Open a GTKterminal session.
- Make sure your OcPoC and host computer are on the same network.
Thats it, you are ready to go!
Connecting over SSH
Once the OcPoC is booted, log in as 'root' - by default there is no password required. After that you will have to change a setting in the ssh_config file. It is best practice to make a copy of this file in it's original state just in case something becomes corrupted.
root cp /etc/ssh/sshd_config /etc/ssh/sshd_config_original nano /etc/ssh/sshd_config
Now that you are looking at the 'sshd_config' file from the text editor you simply alter the line 'PermitRootLogin'; change 'without-password' to 'yes' as shown in the images below.
Ctrl + x y 'Enter'
Now that your OcPoC is configured you need to get the IP address of the device. This can be achieved using the 'ifconfig' command. If you are having trouble obtaining an IP you may need to reboot your OcPoC.
Note the 'inet addr:' as indicated above. This is how you will connect to the OcPoc. The last step will be to set a password for the 'root' user. You should be logged in already, but to confirm, use the 'su' command. If it asks you for a login just type 'root' then follow the steps below.
passwd <your_password> <your_password>
Now move to a terminal on your host computer:
ssh [email protected]<inet_addr> <your_password>
Note: you will be prompted to confirm that you want to connect for the first time, simply type 'yes' followed by 'Enter'.
To exit the ssh connection, simply type 'exit' followed by the 'Enter' key.
Connect over SSH via PuTTY
Connecting via PuTTY is fairly simple. After you open the PuTTY application simply follow these steps:
- Make sure the 'SSH' radio button is selected.
- Enter the <inet_addr> you wrote down from the previous step, in the
'Host Name (or IP address)' text box.
- Make sure the 'Port' text box has 22 entered, this is default so you should not have to change it.
- Click the 'Open' button.
After the pop up box you will be prompted for log in credentials, provide 'root' as the 'login as:' option and press the 'Enter' key. You will then be prompted for a password, use the one you chose when you executed the 'passwd' command earlier. Press 'Enter' key one more time, you should now be logged into your OcPoC over SSH via PuTTY!
Updated over 5 years ago