Skip to content

SSH Access

All the commands in the lab will require you execute commands in a terminal window. Access to a terminal window can be accomplished in the three ways as described below:

If you are unable to use ssh because of connection restrictions, the terminal window in the VM is the only option that you can use.

Enabling SSH

The SSH port should be enabled in your system. If the SSH connection times out, it may be that the SSH port has been disabled for security reasons. In order to open up the SSH port, you must use the Virtual Console that is provided for you in the reservation.

Scroll down your reservation page until you see the blue Console button.

Browser

Pressing the Console button will open a login window.

Browser

Select the watsonx userid and enter the password watsonx.data.

Browser

Select the terminal icon to open a terminal window.

Browser

Type in the following command to start the SSH service.

Start SSH Service

sudo systemctl start sshd

At this point you will be able to the SSH service which is described in the next section.

SSH Command

Your TechZone reservation will include the server name and port number to use when connecting using ssh. The port number is referred to as port in the command below, while the server will be referred to as region.services.cloud.techzone.ibm.com. Replace these values with those found in your reservation.

You have the choice of using the VM Remote console and logging in as the watsonx user to issues commands, or using a local terminal shell (iTerm, Hyper, terminal) to run commands against the watsonx.data server. You can have multiple connections into the machine at any one time.

It will be easier to cut-and-paste commands into a local terminal shell. The VM Remote Console does not support cut-and-paste operation from outside the virtual console environment.

Open a terminal window and use the following syntax to connect as the watsonx userid.

ssh -p port watsonx@region.services.cloud.techzone.ibm.com

The port number and server name are provided as part of the TechZone reservation details.

To become the root user, issue the following command.

sudo su -
Password for both users is watsonx.data.

Terminal Window in the VM

If you use the Remote VM Console, you can log into the watsonx.data user and use a Terminal shell to run commands against the watsonx.data server.

Select the Terminal application in the virtual machine to issue commands.

Browser

This will open up the terminal window.

Browser

At this point you are connected as the watsonx user. You can ignore any lab instructions that ask you to ssh into the watsonx server. To become the root user, you must enter the following command in the terminal window.

Become the root user

sudo su -

Now as the root user you will be ready to run the commands found in the lab.

Cut and Paste

The VM Remote Console does not support cut and paste operations from outside the VM environment. Cut and paste is supported inside the virtual machine, but attempting to paste something from you workstation into the VM Console will fail.

Copying Files

If you need to move files into or out of the virtual machine, you can use the following commands.

To copy a file into the virtual machine use the following syntax:

scp -P port myfile.txt watsonx@region.services.cloud.techzone.ibm.com:/tmp/myfile.txt

The filename myfile.txt will be copied to the /tmp directory. The temporary directory is useful since you can copy the file to multiple places from within the Linux environment.

Multiple files can be moved by using wildcard characters using the following syntax:

scp -P port myfile.* watsonx@region.services.cloud.techzone.ibm.com:/tmp

To move files from the image back to your local system requires you reverse the file specification.

scp -P port watsonx@region.services.cloud.techzone.ibm.com:/tmp/myfile.txt /Downloads/myfile.txt

You can also use wildcards to select more than one file.