Xshell FAQ

FAQ List Show all answers Hide all answers

What protocols do Xshell support?

Xshell is a powerful terminal emulator supporting Telnet, Rlogin, SSH1, and SSH2 protocols. It supports terminal emulation for VT100, VT220, VT320, xterm, ansi, linux, and scoansi. It also supports the Zmodem and SFTP file transfer protocol.

What is SSH?

The Secure Shell(SSH) protocol provides secure authentication and encryption replacing insecure login protocols such as telnet, rlogin and r-commands. It also supports the port forwarding of the X11 connections and arbitrary TCP/IP protocols.

SSH is based on the protocol documented by the SECSH Working group of IETF where many standard documents of network protocols are maintained by network designers, operators, vendors, and researchers.

How do I set and view key combinations?

Certain key combinations are not registered in Xshell and therefore you may not be able to utilize the applicable shortcut keys. In this case, you'll first need to note the string for the keys and either map it using Xshell's key mapping feature or register it as a quick command button.

To set it in Xshell's key mappings, use the following steps.
  1. If you're using a UNIX or Linux terminal, use the following command to find the value of the string which is to be transmitted:

    $ cat –v
    $ sed -n l

    For example, the "Ctrl+Up" key combination spits out the following: ^[[1;5A
    ‘^[' refers to ESC and corresponds to the ASCII 27 character. In Xshell, this corresponds to \033 for key mappings or quick commands.

  2. In Xshell, go to Tools -> Options -> Keyboard and Mouse -> Key Mapping: Edit to open the Custom Key Mappings settings.

  3. Click 'New' and enter the key combination. You'll be prompted to redefine the key if the key combination already exists.

  4. As the action type, select 'Send String.'

  5. Enter the string from step 1. Replace the '^[' characters with \033.
    E.g. ^[[1;5A => \033[1;5A

  6. Click 'OK' and your key mapping is now saved.
The following is a list of key values for Shift, Alt[Meta], Ctrl, and the directional keys when used in Linux's xterm. Keep in mind that certain key combinations may already be registered in Xshell and may be set for different functions. The Alt key must be set as the Meta key when checking Alt key combinations. By default in Xshell, the right Alt key is set as the Meta key. You can find this option in the session properties.

Shift+Up : \033[1;2A
Shift+Down : \033[1;2B
Shift+Left : \033[1;2C
Shift+Right : \033[1;2D

Alt+Up : \033[1;3A
Alt+Down : \033[1;3B
Alt+Left : \033[1;3C
Alt+Right : \033[1;3D

Ctrl+Up : \033[1;5A
Ctrl+Down : \033[1;5B
Ctrl+Left : \033[1;5C
Ctrl+Right : \033[1;5D

Shift+Alt+Up : \033[1;4A
Shift+Alt+Down : \033[1;4B
Shift+Alt+Left : \033[1;4C
Shift+Alt+Right : \033[1;4D

Ctrl+Shift+Up : \033[1;6A
Ctrl+Shift+Down : \033[1;6B
Ctrl+Shift+Left : \033[1;6C
Ctrl+Shift+Right : \033[1;6D

Ctrl+Alt+Up : \033[1;7A
Ctrl+Alt+Down : \033[1;7B
Ctrl+Alt+Left : \033[1;7C
Ctrl+Alt+Right : \033[1;7D

Ctrl+Shift+Alt+Up : \033[1;8A
Ctrl+Shift+Alt+Down : \033[1;8B
Ctrl+Shift+Alt+Left : \033[1;8C
Ctrl+Shift+Alt+Right : \033[1;8D

Broken characters are shown

Characters are not Displaying Correctly

Non ASCII characters may at time not be able to be shown like below:
Abnormal status:

Normal status:

This is caused by differences between language settings. 

System $LANG Environment Variable.

To fix this issue run a command to find out what language and which encoding of that language is being utilized by your terminal.

test@uby:~$ echo $LANG
The output above indicates that the terminal is displaying information in the Korean format and the encoding of Korean characters is UTF-8.
Broken characters are due to this encoding discordance with the terminal emulator.

The Encoding of Xshell

The encoding of the tool bar is set by the session file. But this can be changed at any time and even after the session is started. So when broken characters are shown, check this value.

Match the Encoding Between the Terminal and Xshell

The encoding of Unix and Linux is UTF-8 or Non-UTF-8. UTF-8 is common to all languages and utf8 and UTF-8 are the same. One is the alias of the other. 

But Non-UTF-8 encoding is a little different. If your system uses Non UTF-8 such as EUC(Extend Unix Codes), ISO8859 series, or various Chinese encodings like BIG5, GB, etc., first set the encoding of Xshell to Default Language and try switching between the other encodings in the "More" area of the encoding button. You may need to go through several encodings to find the one that will work correctly.

Using Xagent leads to error "Too many authentication failures for root (code: 2)"


When using Xagent to connect to an Xshell session, the user receives the following error:


During authentication, SSH Agents, including Xagent, continuously provide their keys one by one until a proper key matches. However, every SSH server limits the number of authentication attempts allowed. If too many unsuccessful auth attempts are made and the limit is reached, the ssh server will disconnect the session.

You can choose either to increase the limit of the ssh server or reduce the number of keys for Xagent, or both. To increase the limit, you'll need to configure your sshd_config files in your ssh server.

Once in your sshd_config file, increase "MaxAuthTries" to a desired number which represents the limit of failed auth attempts before the session disconnects. The default value for OpenSSH servers is 6.

Try connecting again after the changes have been made.

Why does the terminal print out "Xshell"?

Most terminals prints out its terminal name when the ^E character is echoed. When users execute the cat command of binary files or there is an abrupt interruption of the running program, an unintended ^E character can be outputted.

When this happens, Xshell prints its terminal name, "Xshell" in the terminal.

If you would like to avoid this behavior, you can prevent Xhsell from echoing back its terminal name. Go to your session properties and leave the "Answerback to ^E" field empty under Terminal -> Advanced.

Unexpected characters shown periodically

Some systems may create an unexpected character when the "Send keep alive message while this session is connected" option is checked in the session's properties.

If you are experiencing this symptom, try unchecking the option below

Double-clicking is making a ^C

Sometimes mouse double-clicking causes a program to terminate.

This is occurring because the double-clicking selects a word and the word is copied to the clipboard. At this time, a Ctrl+C event occurs. This is not an Xshell feature nor a bug.

Certain third party programs act on selected text and creates a keyboard event of Ctrl+C to copy the text to the clipboard.

We do not recommend you utilize such a feature when using Xshell. Try disabling the program or creating an exception for Xshell in the program.

Refer to the following forum post for more information:


Command line parameters for Xshell

Xshell can understand the following command line parameters:

xshell [OPTION]...[FILE]

EXAMPLE: xshell -newwin $SESSION_PATH$
-folder $FOLDER_PATH$:
Opens all session in the $FOLDER_PATH$ folder.
-newwin [protocol://][user[:password]@]host[:port]
-newwin $SESSION_PATH$
Creates a new connection in the new Xshell window

-URL [protocol://][user[:password]@]host[:port] 
Start a connection with URL. 
Example: xshell -url ssh://user1:password@

Open the sessions dialog box. 
Example: xshell -open
Open the product key registration window. 
Example: xshell -register

Open the Xshell about window. 
Example: xshell -about

Open the session properties dialog box. 
Ex: xshell -prop $SESSION_PATH$

-create $SESSION_PATH$
Create a new session. 
Example: xshell -create $SESSION_PATH$

-newtab $NAME$
Assign the tab $NAME$.
Example: xshell -newtab "new tab"

For example, if you want to connect to the server, with user name, root and password, passwd, you would use the following command:

Xshell -url ssh://root:passwd@
(The -url parameter can be omitted in Xshell v5)

This opens the session in the last Xshell window that you interacted with. 

If you want to open the session in the new Xshell window, you would use:

Xshell -newwin ssh://root:passwd@

Xshell Sessions Files set to ‘Read-Only’ After Upgrading to Windows 10

Xshell Sessions Files set to ‘Read-Only’ After Upgrading to Windows 10

This is an issue with Windows 10. You may have trouble saving changes to your Xshell session files because you do not have permission to write. To fix this issue, you must grant yourself full control over your C:\Users folder. We have outlined a few of the solutions below.

Please keep in mind that these are not official solutions provided by Microsoft, and this issue has yet to be addressed by Microsoft. There does not seem to be a “one-solution-fits-all” for this issue as of now.

Option A:

  1. Right click your C:\Users folder and click Properties

  2. Navigate to the Security tab and click Advanced

  3. Make sure your user account is listed under ‘Permission entries:’ and has ‘Full Control’ permissions

  4. If not, click Change permissions and add your user account

  5. Check the “Replace all child object permission entries with inheritable permission entries from this object” box

Option B:

  1. Navigate to Control Panel > Network and Internet > HomeGroup

  2. Join an existing HomeGroup or create a HomeGroup

Option C: (If Logged into Windows 10 using cloud based Microsoft Account)

  1. Right click your C:\Users folder and click Properties

  2. Navigate to the Security tab and click Edit

  3. Click Add and then click Advanced

  4. Click Find Now to populate the search results with a list of available users

  5. Locate your Microsoft Account and click OK and OK again

  6. Give ‘Full Control’ permissions to the account and click Apply

If none of these options resolves the issue, we suggest contacting Microsoft Support to see if they can help resolve the problem.

How to uninstall

  1. Open Control Panel
  2. Under View by:, select Large Icons, and then click Programs and Features
  3. Select Xshell 5
  4. Click Uninstall
  5. Follow the instructions on screen

How do I run the X11 applications through Xshell?

X11 forwarding is a bit different from other TCP/IP port forwarding.
Please, go through the following steps.
  1. To enable X11 forwarding service in Xshell
  2. To enable X11 forwarding service in the SSH server
  3. To run X applications from the Xshell terminal
  1. To enable X11 forwarding service in Xshell:

    On the Tunneling tab of Advanced SSH Options dialog box, check Forward X11 Connections To. and select Xmanager if Xmanager is installed in your PC. If you use another PC X server, select X Display Location and enter the proper display name.

  2. To enable X11 forwarding service in the SSH server:

    Setup the configuration file in the following table.
    SSH server Config file Setup
    OpenSSH /etc/ssh/sshd_config X11Forwarding yes
    SSH.COM /etc/ssh2/sshd2_config AllowX11Forwarding yes

  3. To run X11 applications from the Xshell terminal:

    1. If Xmanager is installed on your PC, just go to the next step. Otherwise, run the PC X server installed on your PC first.
    2. Start the SSH connection with the session enabling X11 Forwarding.
    3. At the shell prompt of Xshell, execute the X11 applications like the following examples:

      [nathaniel@intranet ~]$ xterm &
      [nathaniel@intranet ~]$ startkde &
      [nathaniel@intranet ~]$ gnome-session &

How do I keep Xshell from exiting when network connection is closed?

Use the following setting to prevent Xshell from exiting when the connection is closed.
  1. From the Xshell tool bar, click Tools, and then Options.
    RESULT: Options dialog box opens up.
  2. Click the Advanced tab.
  3. In the Options area, select Exit to local shell on connection close.

How can I import/export my sessions to another computer?

You can import and export your sessions by using the Import/Export tool. This is quick and easy way to share your sessions with other users. Here is how you can import and export sessions:

To export sessions:
  1. Click the File menu and then Export.
    RESULT: Import/Export Sessions dialog box opens.
  2. Enter the name for exported file.
    RESULT: Sessions are exported.
To import sessions that are exported from a different computer:
  1. Click the File menu and then Import.
    RESULT: Import/Export Sessions dialog box opens.
  2. Click on the Open (...) button and select the exported file.
  3. Click Next.
  4. Select the type of sessions you want to import.
  5. Click Next.
Sessions files are saved under the following directory:

C:\Documents and Settings\%USER%\Application Data\NetSarang\Xshell\Sessions (Windows 2000/XP)
C:\Users\%USER%\AppData\Roaming\NetSarang\Xshell\Sessions (Windows Vista/7)

*Replace %USER% with the real Windows username.

To access Server A, I need to make a connection from Server B. How can I configure Xshell to directly connect to server B?

To connect to Server A through an intermediate server, Server B, you can use the Wait & Response feature. Please follow the instruction below:
  1. Open Xshell.
  2. Click File, and then Open.
    RESULT: Sessions dialog box opens up.
  3. Select a session that will be an intermediate server. (Server B)
  4. Right click on the session, and then click Properties.
    RESULT: Session Properties dialog box opens up.
  5. Click Logon Scripts.
    RESULT: Logon Scripts page opens up.
  6. Select the Execute the following Expect & Send pairs. 
  7. Click Add.
    RESULT: Wait & Response Rule dialog box opens up.
  8. In the Expect field, type in the last few characters of the shell prompt
    Ex: If your prompt says [oracle@OTS oracle]$ , then you should write oracle]$.
    NOTE: This is the last line you see on the Xshell terminal when you login to the destination server.
  9. In the Response field, type in the SSH or Telnet command you use when connecting to the destination server.
    Ex: ssh John@
  10. Repeat steps 9 and 10 for password and other commands.

How can I open an Xftp session from the current Xshell session?

If Xftp is already installed, the Xftp button (New File Transfer) in the Xshell toolbar is automatically activated.
  1. Click on the Xftp button (New File Transfer).
  2. Xftp then opens a new session by using the same account information provided in Xshell session.

How do I transfer files using SFTP?

You can use 'sftp' command from the local Xshell prompt to transfer files.
  1. Use the following 'sftp' command and connect to a server where files will be transferred.
    sftp [user@]host [port]
    Example of command line)
    Xshell> sftp myhostname
    Xshell> sftp myusername@myhostname
    Xshell> sftp myusername@myhostname 12345
  2. On the sftp prompt, 'help' command lists a set of available sftp commands.
    sftp:/home/myusername> help
    bye finish your SFTP session
    cd change your remote working directory
    clear clear screen
    exit finish your SFTP session
    explore explore your local directory
    get download a file from the server to your local machine
    help give help
    lcd change and/or print local working directory
    lls list contents of a local directory
    lpwd print your local working directory
    ls list contents of a remote directory
    mkdir create a directory on the remote server
    mv move or rename a file on the remote server
    put upload a file from your local machine to the server
    pwd print your remote working directory
    quit finish your SFTP session
    rename move or rename a file on the remote server
    rm delete a file
    rmdir remove a directory on the remote server
  3. Following is sample sequences of uploading files.
    1. Use 'cd' command to move to a directory where you want to upload files to. (Server)
    2. Use 'lcd' command to move to a directory where the files, which will be uploaded, are saved. (Windows)
    3. Check the file name with 'lls' command.
    4. Start uploading with 'put' command.
If Xftp is already installed, Xshell can create an Xftp session from the current Xshell session for easier and more secure file transfer. For more information on how to integrate Xftp and Xshell, please refer to the How can I open an Xftp session from the current Xshell session?.

What is the difference between SSH1 and SSH2?

SSH2 is a complete rewrite of the SSH1 protocol. They are two entirely different protocols. SSH2 is a significant improvement over older versions of the Secure Shell protocol. It is more secure, better designed and more flexible, so anyone who is still using SSH1 is strongly encouraged to upgrade to SSH2.

The SSH2 protocol provides the services such as server authentication, encryption, data integrity verification, and client authentication. The server authentication is performed using the DSA public key algorithm. For the encryption and the data integrity verification, a number of algorithms that can be implemented in modular fashion on every SSH2 product are provided. The client authentication can be performed using password and public key algorithm such as DSA or RSA as well as a variety of other methods.

What encryption algorithms does Xshell support?

The supported ciphers are AES128/192/256, 3DES, BLOWFISH, CAST128, ARCFOUR, and RIJNDAEL. And Xshell supports SHA1, SHA1-96, MD5, MD5-96, and RIPEMD160 MAC algorithms. You can configure multiple ciphers and MAC algorithms to be tried in order of the appearance in the list.

How do I configure to secure arbitrary TCP applications with the SSH port forwarding?

The SSH port forwarding is a good method of allowing secure, encrypted connections to traditionally non-encrypted services, such as POP3 for email, NNTP for news, etc. You can easily setup a port forwarding rule from Xshell. Simply put proper information to the Forwarding Rules dialog box.

If you are connecting from local client applications to the remote server application, you should set Xshell to forward the local port to the remote port.

Type(direction): Outgoing
Listen Port: a port on your machine
Remote Host: remote server to connect to
Remote Port: remote port on the remote host

If you are making secure connection to a POP3 server (mail.xyz.com:110) over Xshell, you may set as follows:

Listen Port: 5110
Remote Host: mail.xyz.com
Remote Port: 110

And, on the mail client(MS Outlook), you must setup the mail server and port.

Incoming mail server: localhost
Incoming mail port: 5110

The POP3 client will connect to Xshell at local rather than connecting to the remote mail server directly. Xshell forwards all traffics to the mail server over the secure tunnel and transfers all traffics received from the mail server to the POP3 client.

Now that I have purchased Xshell, do I need to download any install file? And how can I apply my product key?

Xshell evaluation is fully functional copy and there is no need to reinstall additional software. To apply your product key follow the steps below:

  1. Start Xshell.
  2. From the Help menu click Register Xshell.
    RESULT: Registration window opens up.
  3. Enter your product key and click OK.
Also, expiration date notice window will not appear again once you apply your product key.

Xshell fails to make connection and it displays the following message: "Cound not connect to..."

"Could not connect to 'hostname': Unknown host."

Check if the host name is entered correctly. Also, if you are using the host name, try using the IP address instead.

"Could not connect to 'hostname' (port 22): Connection failed."

Check if the host machine is ready for connection and the port is reachable. If you are connecting to a SSH server, make sure that SSH daemon is running on the remote host.