Diadem Web Hosting Knowledgebase
Search:     Advanced search

SSH Access to a Jelastic Account

Article ID: 963
Last updated: 17 Nov, 2017
Views: 350

1. Open the Jelastic dashboard and navigate the toolbar options of perticular Instance.


2. Click the Settings button from Instance.

From Instance -> Settings


OR
From Accounts Settings

In the opened Account settings tab, navigate to the SSH Keychain -> Public -> Add Public Key option.

3. Click the link in the note to open your SSH gate.  As a result, you’ll access Shell Handler via console automatically. Or, just copy the given command line and run it via your console (SSH client).

SSH Connectivity from client end
We can use Linux, MacOS, FreeBSD servers for SSH connectivity from client end. Also if the clients are tryed to connect SSH from local window system they need some SSH third party software as Putty or MobaXterm.
MobaXterm Software download link: http://download.mobatek.net/10220170312132617/MobaXterm_Installer_v10.2.zip


4. Please open the MobaXterm software and start the local terminal.

NOTE: To establish the SSH connection for Windows OS, you need to have a private key on your local machine which corresponds to the public one, previously added to the Jelastic dashboard. Therefore, perform the following steps:



5. Run the below given command at local terminal on MobaXterm softeware.
# ssh-keygen -t rsa
Enter passphrase (empty for no passphrase): press enter
Enter same passphrase again:press enter
The key fingerprint is:press enter


6. Yoy can find the public key from id_rsa.pub file on below location.
# cat /home/mobaxterm/.ssh/id_rsa.pub


7. To establish the SSH connection for Windows OS, you need to have a private key on your local machine which corresponds to the public one, previously added to the Jelastic dashboard.


8. Now you can run the ssh command shown on Jelastic Panel.
# ssh 36@gate.diadem.io -p 3022

9. After that, you’ll see a full list of containers provisioned for the chosen environment.

10. Beside each container its node ID and Public IP address are stated.

11. To access the container, enter its list number.


Direct Access to the Container

You can also "jump" directly to the necessary container, skipping the steps of choosing appropriate environment and node.


To perform this, you need to know the required container ID. It can be retrieved using the previously described method of SSH access with interactive menu. There, you can see a list of all available containers and their ID numbers (the nodeid value).


Use the nodeid value of the required container in the command of the following type:

# ssh {nodeid}-{uid}@{SSH_gate} -p 3022

Example:
For apache node:
# ssh 1997-36@gate.diadem.io -p 3022

For MySQL node:
# ssh 1996-36@gate.diadem.io -p 3022


SSH port change from 22 to 2043 for a Jelastic VPS

1. Change the port in /etc/ssh/sshd_config
Port 2243

2. Modify iptables rules
*nat
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 22 -j REDIRECT --to-ports 2243

*filter
iptables -t filter -A INPUT -p tcp -m tcp --dport 2243 -m state --state NEW -j ACCEPT

Prev   Next
Setting Up a Cronjob in Jelastic Cloud     Signup and Familiarize with Jelastic Environment