Previous Topic: VPS Server ConfigurationNext Topic: Final Steps


Setting up two SSH server instances

In this step we set up a secondary SSH sever, so that the VPS is accessible both to the client that rents it, and to the provider of the VPS (as well as to administrators of the grid itself), while each SSH instance maintains its own configuration and changes to it do not interfere with the operation of the other instance. The primary SSH instance, as configured by the OS install is left for use by the VPS users and is configurable by them. The secondary instance is dedicated to access from the grid, for the VPS provider / administrator.

Note that the actual setup may vary with OS type and SSH server version. The examples here assume the OS is unix-style and the server is OpenSSH.

The two instances of the SSH server can be configured with different security settings, to match specific needs of the VPS user.

  1. Copy the configuration of sshd into a new sub-directory, for example:
    mkdir /etc/ssh_grid
    cp /etc/ssh/sshd_config /etc/ssh_grid
  2. Edit the original configuration file (/etc/ssh/sshd_config) and:
  3. Edit the copied configuration file (/etc/ssh_grid/sshd_config) and make the following changes:
  4. Create a new auto-start script for the second ssh server, with the following commands in it:
    # get service IP address
    f=/var/run/applogic/appliance.desc
    p=instance:`udlparse elst $f instance`/interface:default
    addr=`udlparse get $f $p/ip`

    # start ssh daemon
    sshd -f /etc/ssh_grid/sshd_config -o ListenAddress=$addr