Open Ssh Connection



Last updated: 19 Mar, 2021
Copy
Copied

You can use MobaXterm to connect from your local Windows system to NAS systems via , as an alternative to Cygwin/OpenSSH. MobaXterm includes a built-in X11 client, and has the ability to forward X11 from NAS systems back to your local system. You can also use it to create VNC sessions.

Note: MobaXterm is only useful if you are using to connect to NAS systems. It cannot be used for remote transfers utilizing the Secure Unattended Proxy () with Shift or other commands.

Downloading and Installing MobaXterm

MobaXterm Home Edition is available for free, and should be sufficient for most users. If you have admin privileges on your local system, you can install a full version (Installer Edition) with Start menu support. If a full software installation is not possible, you can use the standalone version (Portable Edition).

A paid version (MobaXterm Professional) is also available.

You can download them here: https://mobaxterm.mobatek.net/download.html

Connecting to NAS Systems

If you do not have Passthrough set up, use Method 1 to first connect to a secure front end (SFE), then log into a Pleiades or Lou front end (PFE or LFE).

If you have Passthrough set up, you can connect directly to a PFE or LFE using Method 2.

Method 1: Creating a New Session to Connect to an SFE

Complete these steps to create a new session to connect to a secure front end (SFE).

  1. Click the Session icon in the top left corner of the initial window (or use Ctrl-Shift-N).
  2. In the Session settings window (shown below), select the tab by clicking the icon in the top menu.
  3. In the Remote host field, enter the full hostname of an SFE. In the Specify username field, enter your NAS username.
  4. Click OK, and enter your NAS password and your RSA SecurID passcode when prompted.
    Option: If you have set up public key authentication between your local Windows system and the , before you click OK you can provide the path to your public key file (id_rsa) in the Advanced settings tab, as shown below. You will be prompted for only the RSA SecurID passcode.

Once you are connected to the SFE, you can use the Linux command line to into a PFE or LFE. Enter your NAS password when prompted.

Note: After you change your NAS password, you might have to remove your old password stored in MobaXterm before you can enter the new password when prompted. To remove your old NAS password, go to the the MobaXterm Settings dropdown menu and select Configuration; then select MobaXterm passwords management; then select the password that was changed, and click Delete.

Method 2: Creating a New Session to Connect Directly to a PFE or an LFE

If you have Passthrough set up, complete these steps to connect directly from your Windows system to a PFE or LFE:

  1. Click the Session icon in the top left corner of the MobaXterm client window (or use Ctrl-Shift-N).
  2. In the Session settings window, click the icon in the top menu to select the tab.
  3. In the Remote host field, enter the full hostname of a PFE or LFE.
  4. Point MobaXterm to your public key file (rsa_id) in two places:
    • On the Advanced settings tab, enter the path to your public key. If you like, you can also enable X11 forwarding on this tab. For example:
    • On the Network settings tab, enter the information used to go through the SFE (the gateway server, your NAS username, and the path to the private key):
  5. (Optional) In the Bookmark settings tab, name this session for future use.

  6. Click OK to start the login process.
    Note: From now on, the session will be displayed in the Recently used section when you start MobaXterm, and you can start the login process by double-clicking it there.

  7. You will be prompted to enter your key passphrase (if set), and then your RSA SecurID passcode.

MobaXterm will log into the NAS system that you set in Step 3 (in this example, pfe24):

Duplicating a Login Session

If the original login session is still running, you can duplicate it to create new login sessions. Click the Sessions section, and select the session you want to duplicate:

A new xterm tab will be created and logged in. No passphrase or passcode will be needed:

Note: To connect to other NAS systems, (for example, pfe26 instead of pfe24) you must start a new connection. You will be prompted for your passphrase and RSA SecurID passcode.

Running a Graphical Application with VNC

If you enabled X11-forwarding in the Advanced settings tab when you initiated your session, you can run X and OpenGL applications. For example:

However, we highly recommend using Virtual Network Computing (VNC) for graphical work on NAS back to your local machine, as it is generally faster than X11 forwarding.

Using an X11 alternative like VNC in MobaXterm requires two tunnels through the NAS SFEs. To run VNC, you will need to do the following:

  • Start a VNC server on a PFE and get a port established for the connection (for example, 5901), as described in Step 2 of the VNC article (Run the vncserver Command on pfe24).
  • Create the tunnels from your local workstation to the VNC server running on the PFE, as described in the next section.

Sample Setup for Using VNC on MobaXterm

In this example, forwarding is enabled between port 5901 of the local machine and port 5901 on pfe26, where a VNC server is running with a tunnel that passes through the SFE on port 6901.

Note: These port numbers will be different in your case, depending on which ports VNC is listening on and which PFE you are running on.

This example was created as follows:

In the main MobaXterm client window, click the Tunneling icon to open the MobaSSHTunnel window. Then, click New tunnel and create Tunnel 1 and Tunnel 2.

To create Tunnel 1:

To create Tunnel 2:

Once Tunnel 1 is started, then start Tunnel 2. Both will prompt for the RSA SecurID passcode and your NAS password, as MobaXterm doesn't allow for keys when tunneling.

Now, you can start a local VNC viewer on your local system, pointing at port 5901.

SSH Timeouts

Openssh For Windows 10 64 Bit

Hello I accessed my server with ssh one time on from Ubuntu16.04 But when tried to connect next time I goy this error 'Could not open a connection to your authentication agent' after executing. I have been ssh'ing to this computer (also Ubuntu 16) for months, today it's not working.running ssh -v ip yieldsOpenSSH7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016debug1: Reading. Is your OpenSSH server connection drops out after few minutes? Here is how to increase ssh connection time out to fix this annoying problem on Linux/Unix. Allows you to open a remote folder on any remote machine, virtual machine, or container with a. The easiest method to set up SSH connection to is.

When using default configuration on Ubuntu, you might experience SSH Timeouts (i.e. the console you are using to connect to a remote server will seem to freeze) after a few minutes of lack of activity.

Postfix Connection Timed Out

This is annoying because you need to open a new console instance and reconnect and perform any other steps you need before connecting.

Since using SSH to connect to remote servers is very common and linux being as old as it is, you would think that someone somewhere would have provided a solution for this problem by now; you'd be right.

Configuration

To increase the time a connection stays open you need to add configuration both to the client and the server

Open ssh connection ubuntu

Client side

Open ssh connection refused

In the server/computer you are connecting from

Open file /etc/ssh/ssh_config and set directive ServerAliveInterval to a value like 60:

Open ssh connection ubuntu

This causes your SSH client to send keep-alive messages every 60 seconds so that the server doesn't drop your connection.

Server-side

Openssh download

In the server you are connecting to

You must also configure the SSH remote Server you are connecting to.

Open file /etc/ssh/sshd_config and add these configurations1 at the end of the file.

Restart the ssh server so that changes take effect:

Open Ssh Connection Windows

Footnotes

Openssh Download

1: These are conservative settings that will make your SSH Server disconnect after (600 * 10 = 6000) seconds of user inactivity. Customize these if you need more.