SSH Tunnel for VMware vSphere Client

SSH Tunnel for VMware vSphere Client

Objectives

1. Use VMware vSphere Client to connect to a remote server through an SSH tunnel.

Prerequisites

1. Remote connection to a terminal on the customer's network.

2. VMware vSphere Client installed on your computer.

3. VPN connection.

4. root password for "fcadmin01.fullcount.net".

Instructions

  1. Log into the VPN.
  2. Look up the IP address of the physical server.
  3. Log into a FullCount terminal via SSH.

Note: The terminal must be able to ping the IP address of the physical server.

  1. Set an environment variable with the IP address of the physical server:

      # export SERVER_IP=10.29.49.1

  1. Set environment variables for the console port:

      # export SERVER_CONS_PORT=902
      # export ADMIN_CONS_PORT=902

Note: Always use port 902. This is hardcoded into the vSphere client and cannot be changed.

  1. Set an environment variable with the vSphere management port on the physical server:

      # export SERVER_MGMT_PORT=443

Note: Always use port 443. This is hardcoded in ESXi and cannot be changed.

  1. Find the next available port number on “admin.portal.fullcount.net”

      # ps -ef | grep ssh | grep tunnel

  1. Set an environment variable with the next available port number on “admin.portal.fullcount.net”

      # export ADMIN_MGMT_PORT=53904

  1. Set an environment variable with hostname of the “admin” server:

      # export ADMIN_HOSTNAME=admin.portal.fullcount.net

  1. Run the following command on the terminal you logged into in step 3:

      # ssh \
      -C \
      -n \
      -N \
      -o ExitOnForwardFailure=yes \
      -R ${ADMIN_CONS_PORT}:${SERVER_IP}:${SERVER_CONS_PORT} \
      -R ${ADMIN_MGMT_PORT}:${SERVER_IP}:${SERVER_MGMT_PORT} \
      ${ADMIN_HOSTNAME}

  1. Type in the password for the user on the “admin” server and press Enter.
    1. If the connection is successful, you will not see any output.
    2. Be sure to leave this window until after you exit the vSphere client.
  2. Start the VMware vSphere Client application on your computer.
  3. In the “IP Address / Name” textbox:
    1. Type the hostname from step 9 followed by a colon (:).
    2. Type the port number from step 8.

Note: Make sure there aren’t any spaces between the hostname and the colon.

  1. In the “User name” textbox:
    1. Type “root” (without quotes).
  2. Click on the “Login” button.
  3. Click on the “Ignore” button.
  4. Click on the “Inventory” icon.
  5. Click on the “+” near the top left.
  6. Click on the name of the VM.
  7. Click on the console tab.
  8. Click on the black area under the console tab.
  9. Press the space bar a few times to “wake up” the console.
  10. After the console wakes up, delete the spaces that you type.
  11. Run whichever commands you need to (filesystem check, etc.)
  12. Press Contol + Alt to release the cursor.
  13. Exit the vSphere client.
  14. Press Control + C in your SSH window to disconnect from the “admin” server.

 



    • Related Articles

    • Install PuTTY SSH Client

      Install PuTTY SSH Client Objectives Install PuTTY SSH client on your computer. Prerequisites A computer A web browser An Internet connection Instructions Open a web browser, and click on the following link: ...
    • Set up SSH Authentication Agent

      Set up SSH Authentication Agent Objectives Create a batch file to automatically launch Pageant whenever you log into your computer. Convert openSSH keys into PuTTY's private key file format. Load private keys into Pageant's keyring. Prerequisites ...
    • Configure VMware ESXi Network Settings

      Objectives Configure a static IP address, subnet mask, default gateway, and DNS servers for VMware ESXi. Prerequisites Physical acccess to the server. A monitor with a VGA cable (i.e. not DVI, HDMI, or DisplayPort). A USB keyboard. Username and ...
    • Overview of Deployment Process for Remote Servers

      Overview of Deployment Process for Remote Servers Introduction The process for updating the Touchscreen and Back Office applications is known as the deployment process. The deployment process is only used for updating applications and databases on ...
    • Guide to 7.4.0 Printing Changes

      Introduction All terminals printing is done via SSH. 7.4.0 is the first image version FullCount has released with different SSH keys from the previous version(s) and disallows the use of older weaker keys. This was done in an effort to fortify the ...