- SSH Console¶ A workstation (Mac, Linux, Window), on the same wifi network as the OVMS module, can use the ssh protocol to connect. In Windows you can use the free PUTTY ssh client. In Linux and OSX ssh is built-in. The syntax is simply.
- You'll need to get a usb-serial adapter and then connect with a console cable. Adapters aren't very expensive. Connecting to the Console Port with Mac OS X To connect a Mac OS X system USB port to the console using the built-in OS X Terminal utility, follow these steps: Step 1 Use the Finder to go to Applications Utilities Terminal.
- Bitvise SSH Client: Free SSH file transfer, terminal and tunneling. Our SSH client supports all desktop and server versions of Windows, 32-bit and 64-bit, from Windows XP SP3 and Windows Server 2003, up to the most recent – Windows 10 and Windows Server 2019. Our client is free for use of all types, including in organizations. To begin, simply download it here.
Console Connections¶
OVMS v3 includes a powerful command line console that can be accessed in various ways:
The Terminal app is the default CLI that comes bundled with the Mac, and is a rather.
- Using a micro USB cable to a host computer.
- TELNET (over wifi).
- SSH (over wifi).
- Web Console SHELL tab.
- Remote Apps.
- SMS.
USB Console¶
Our recommendations for the USB console are as follows:
- You can use a Windows, Linux, Mac OSX workstation or an Android device with a USB OTG adapter cable.
- If your operating system does not have the SILABS USB driver, you can download the driver from SILABS website. If you use Linux and your distribution includes the braille display driver “brltty”, you may need to uninstall that, as it claims any CP2102 device to be a braille device. This applies e.g. to openSuSE 15.0.
- Plug in the module to your PC/laptop, using a micro USB cable. Check to ensure a serial port appears (using the SILABS driver). For OSX and Linux this will normally appear as /dev/tty.SLAB_USBtoUART or /dev/ttyUSB0 (or 1/2/… if other serial devices are connected). List your devices using “ls /dev/*USB*”.
- Once the serial port is available you will need a terminal emulator.
- For OSX, the simplest is the built-in SCREEN utility. You run this as
screen-L/dev/tty.SLAB_USBtoUART115200
But note that the device path may be different for you - check with ‘ls /dev/*USB*’. You can use ‘control-a control-y’ or ‘control-a k y’ (three key sequences) to exit the screen. The “-L” option tells screen to capture a log of your session into the file “screenlog.<n>”. - For Linux, the SCREEN utility is also simple to get. If it is not included with your distribution, you can simply yum install screen, or apt-get install screen (depending on your distribution). From there, the command is the same as for OSX. Alternatively, you can use minicom (which is included with many linux distributions).
- For Windows, a simple approach is to download the free PUTTY terminal emulator. This supports both direct ASYNC (over USB) connections, as well as SSH (network). You can download putty using this link.
- For Android, there are multiple USB serial Apps in the Play store. A good recommendation is Serial USB Terminal by Kai Morich.
- Once you have established the connection, press ENTER to see the “OVMS>” prompt.
SSH Console¶
A workstation (Mac, Linux, Window), on the same wifi network as the OVMS module, can use the ssh protocol to connect. In Windows you can use the free PUTTY ssh client. In Linux and OSX ssh is built-in.
The syntax is simply:
Where ‘user’ is the username (normally ‘ovms’) and ‘ip’ is the IP address of the OVMS v3 module. In environments supporting mDNS networking, you should also be able to connect using the mDNS name <vehicleid>.local. The password you enter is the module password.
If you use ssh public/private key pairs, you can store your public key on the OVMS v3 module, to take advantage of passwordless login.
OVMS#configsetssh.keys<user><public-key>
In this case, ‘user’ is the username you use to ssh, and the public key is your RSA public key (the long base64 blob of text you find in id-rsa.pub between ‘ssh-rsa’ and your username/comment).
You can also use SCP to copy files to and from the OVMS v3 VFS.
Note
With OpenSSH version 6.6 (or later), cipher aes128-cbc
has been disabled by default andneeds to be enabled manually, either on the command line:
…or by adding a host entry to your ~/.ssh/config
file:
Console Basics¶
Let’s use SSH to demonstrate this:
When first connecting using USB, the console will be in non-secure mode (as indicated by the “OVMS>” prompt). Here, only a limited number of commands are available (such as viewing network status, modem status, or system time). To get to secure mode, enter the command ‘enable’, and provide the module password. The prompt will then change to “OVMS#”:
You can enter the ‘disable’ command to get out of secure mode, and ‘exit’ to exit the console completely.
When connecting via a pre-authenticated protocol such as SSH, you will be in secure mode automatically.
At any time, you can use “?” to show the available commands. For example:
You can also use “?” as part of a command to expand on the available options within that command root:
The TAB key can also be used to expand on commands or parameter options:
Obtain SSH credentials
Obtain your SSH credentials from the Bitnami Launchpad
The Bitnami Launchpad for Google Cloud Platform automatically injects an auto-generated public SSH key for the bitnami user and allows the user to download the private SSH key. To do so, follow these steps:
- Browse to the Bitnami Launchpad for Google Cloud Platform and sign in if required using your Bitnami account.
- Select the “Virtual Machines” menu item.
- Select your cloud server from the resulting list.
Download the SSH key for your server (.pem for Linux and Mac OS X,.ppk for Windows). Note the server IP address on the same page.
Obtain your SSH credentials from the GCP Marketplace
The GCP Marketplace requires the user to manually add a public SSH key using the server administration page. It then uses the user@hostname comment at the end of the public SSH key to decide which user account on the server should be associated with the key.
Watch the following video to learn how to add your SSH credentials to your server through the Google Cloud Console:
Follow the steps below in order to add your public SSH key:
Prepare an SSH key pair for use.
To generate a new SSH key pair, you can use PuTTYgen (Windows) or the ssh-keygen command (Linux and Mac OS X). Find instructions on using PuTTYgen and instructions on using ssh-keygen.
Log in to the Google Cloud Console and select your project.
Navigate to the “Compute Engine -> VM Instances” page and select the server you wish to connect to.
Click the “Edit” link in the top control bar.
On the resulting page, copy and paste your public SSH key into the “SSH Keys” field.
Update the user@hostname comment at the end of the SSH key content to bitnami. This will associate the SSH key with the bitnami user account that is already present on the server. The “Username” next to the form field will update accordingly.
Add more keys as needed by clicking the “Add Item” button. Once done, save the changes by clicking the “Save” button.
Connect through a browser
Connect through a browser from the Bitnami Launchpad
If you are using the Bitnami Launchpad, follow these steps:
- Browse to the Bitnami Launchpad for Google Cloud Platform and sign in if required using your Bitnami account.
- Select the “Virtual Machines” menu item.
- Select your cloud server from the resulting list.
Click the “Launch SSH Console” button.
This will automatically transfer the necessary keys and connect you to your machine console in a new browser window.
NOTE: This is only supported in certain browsers, for more information, look at the Google documentation.
Connect through a browser from the GCP Marketplace
You can also connect to your server using the Google Cloud Platform console. Follow these steps:
- Browse to the Google Cloud Platform console and sign in if required using your Google account.
Find and select your project in the project list.
Click the “Hamburger” button on the left side of the top navigation bar:
Select the “Compute -> Compute Engine” menu item.
Locate your server instance and select the SSH button.
This will automatically transfer the necessary keys and connect you to your machine console in a new browser window.
NOTE: Bitnami documentation usually assumes that server console commands are executed under the bitnami user account. However, when connecting through a browser SSH console as described above, you may be logged in under a different user account. To switch to the bitnami user account, use the command sudo su - bitnami.
Connect with an SSH client
TIP: Refer to these instructions to learn how to obtain your SSH credentials.
Connect with an SSH client on Windows using an SSH key
In order to access your server via SSH tunnel you need an SSH client. In the instructions below we have selected PuTTY, a free SSH client for Windows and UNIX platforms. To access the server via SSH tunnel using PuTTY on a specific port using an SSH tunnel, you need to have it configured in order to allow connections to your server.
Step 1: Obtain PuTTY
- Download the PuTTY ZIP archive from its website.
- Extract the contents to a folder on your desktop.
- Double-click the putty.exe file to bring up the PuTTY configuration window.
Step 2: Convert your PEM private key to PPK format (optional)
If your private key is in .pem format, it is necessary to convert it to PuTTY’s own .ppk format before you can use it with PuTTY. If your private key is already in .ppk format, you may skip this step.
Follow the steps below to convert your .pem private key to .ppk format:
- Launch the PuTTY Key Generator by double-clicking the puttygen.exe file in the PuTTY installation directory.
Click the “Load” button and select the private key file in .pem format.
Once the private key has been imported, click the “Save private key” button to convert and save the key in PuTTY’s .ppk key file format.
Step 3: Configure PuTTY
- Double-click the putty.exe file to bring up the PuTTY configuration window.
In the PuTTY configuration window, enter the host name or public IP address of your server into the “Host Name (or IP address)” field, as well as into the “Saved Sessions” field. Then, click “Save” to save the new session so you can reuse it later.
Obtain your SSH credentials in order to allow the authentication against the server. Refer to the FAQ to learn how to obtain your SSH credentials for your client.
In the “Connection -> SSH -> Auth” section, browse to the private key file (.ppk) you’ve previously obtained in the step above.
In the “Connection -> Data” section, enter the username bitnami into the “Auto-login username” field, under the “Login details” section.
In the “Session” section, click on the “Save” button to save the current configuration.
Select the session you want to start (in case that you have saved more than one session) and click the “Open” button to open an SSH session to the server.
PuTTY will first ask you to confirm the server’s host key and add it to the cache. Go ahead and click “Yes” to this request (learn more).
You should now be logged in to your server. Here is an example of what you’ll see:
Ssh Console For Mac Osx
TIP: In case of difficulties using PuTTY, refer to the official documentation for troubleshooting advice and resolution for common error messages.
Connect with an SSH client on Linux and Mac OS X using an SSH key
Linux and Mac OS X come bundled with SSH clients by default. In order to log in to your server, follow the steps below:
- Open a new terminal window on your local system (for example, using “Finder -> Applications -> Utilities -> Terminal” in Mac OS X or the Dash in Ubuntu).
Set the permissions for your private key file (.pem) to 600 using a command like the one below. Refer to the FAQ to learn how to obtain your SSH credentials.
Connect to the server using the following command:
Remember to replace KEYFILE in the previous commands with the path to your private key file (.pem), and SERVER-IP with the public IP address or hostname of your server.
Your SSH client might ask you to confirm the server’s host key and add it to the cache before connecting. Accept this request by typing or selecting “Yes” (learn more).
You should now be logged in to your server. Here is an example of what you’ll see:
Forward your key using SSH Agent
Ssh Tools For Mac
With key forwarding, you can connect to a host using an SSH key and then make the key available for subsequent SSH connections from that host. Key forwarding lets you connect to a host (host A) with your SSH key, and then connect to another host (host B) from host A using the same key.
Ssh Console For Mac Os
Forward your key using SSH Agent on Windows
To forward your SSH key using PuTTY, you must first have SSH access to your server. Please check the SSH instructions for Windows section for more information on this.
Once you have your SSH client correctly configured, enable SSH Agent forwarding. To do so, follow these steps:
In the “Connection -> SSH -> Auth” section, activate the “Allow agent forwarding” checkbox.
In the “Session” section, save your changes by clicking the “Save” button.
Click the “Open” button to open an SSH session to the server. The SSH session will now forward your key for subsequent SSH sessions starting from the same server. You can check this by running the following:
TIP: In case of difficulties using PuTTY, refer to the official documentation for troubleshooting advice and resolution for common error messages.
Best Ssh Tools For Mac
Forward your key using SSH Agent on Linux and Mac OS X
Follow the steps below.
Free Ssh Tools For Mac
- Open a new terminal window on your local system (for example, using “Finder -> Applications -> Utilities -> Terminal” in Mac OS X or the Dash in Ubuntu).
- Ensure that you have the following information:
- IP address of the host which will forward the key.
- Private SSH key (.pem key file) for the host which will forward the key.
Run the following command on your local system to add the SSH key to the agent. Remember to replace KEYFILE with the path to your private key:
Connect to the host using the -A option. Remember to replace SERVER-IP with the public IP address or hostname of your host.
The SSH session will now forward your key for subsequent SSH sessions starting from the connected host. You can check this by running the following command: