Creating an SSH session
SSH sessions can be made from the SSHepherd® Control App on Windows, Linux and MacOS. We are using Windows in this example.
- Launch the SSHepherd® Control App.
- Click the ‘+’ icon to bring up the ‘Configure Tunnel’ window.
- Select a Host. This field contains a list of all Hosts you have been granted access to.
- Select the Type. This field is the connection type for the session. Choose SSH from the list.
- Tunnel Name. This field allows you to give the tunnel a descriptive name.
- Local Port. By default, this option is set to ‘Automatic’ and will select a random port for you. The other option allows you to manually set a port for this tunnel.
- SSH User. This field is for the SSH User account you will login to the Host with.
- Save the Tunnel.
You will now see the tunnel(s) you created.
- Click the toggle switch to start your SSH session.
- You will see the Terminal launch an SSH session where you will be prompted to enter your preexisting SSH username and password.
When you exit the SSH session, the SSHepherd® tunnel will automatically close.
Creating an SSH session using the SSHepherd® Control CLI
The SSHepherd® Control CLI tool (shepctl) works across Windows, Linux and MacOS. For more information about the shepctl options, run shepctl –help.
- Open a Terminal or Command Prompt, and type the following to login to your SSHepherd® server.
shepctl --url https://your.sshepherd.server login
- When prompted, enter your login credentials.
Alternately, to confirm you are logged in, type:
shepctl whoami
- Now that you are logged in, the following command will return a list of the Hosts you are able to access. You will need to take note of the hostname for the server you want to establish an SSH connection to.
shepctl list-host
- Run this command to establish an SSH session:
shepctl --hostname <your ssh host/agent> --sshuser <your ssh username> ssh-tunnel
Example using SSH keys:
shepctl --hostname ip-172-31-20-229 --sshargs "-i RichNewKey.pem" --sshuser ubuntu ssh-tunnel
Example using SSH user and password:
shepctl --hostname ip-172-31-20-229 --sshuser ubuntu ssh-tunnel