About Xshell

Xshell 4 Help / About Xshell
About Xshell

Xshell is a powerful SSH, TELNET and RLOGIN terminal emulator software operating on the Windows platform. Windows users can conveniently and securely access UNIX/Linux hosts using Xshell. SSH (secure shell) protocols support encryption and user authentication for secure connection on the Internet and can replace legacy protocols, such as TELNET and RLOGIN.

See Also

Key Functions
Recommendations
Install and Uninstall

Copyright© 2013 Netsarang Computer, Inc. All rights reserved.


Key Functions

Xshell 4 Help / Key Functions
Key Functions

This section provides descriptions on key functions of Xshell.

General

l Supports SSH1, SSH2, SFTP, TELNET, RLOGIN and SERIAL protocols

l Supports Windows 2000/XP/2003/Vista/2008/7/8

l Supports OpenSSH and ssh.com servers

l Multi-user setting

l Keep alive option

l SOCKS4/5, HTTP proxy connection

l Supports multiple sessions (session tab, session bar)

l Custom key mapping

l VB scripting

l New links bar

l Automatically reconnects if disconnected

Session Management

l Creates and manages sessions for other hosts

l Supports Sessions dialog box, address bar, local prompt, shortcut to session, and links bar to open sessions

l Provides a default session for quick connection

l Simultaneous connection with multiple sessions

l Address bar supports URL commands and allows connection to a remote host with or without a saved session

l Opens sessions with Xactivator

l Supports automatic login and login scripts

l Supports folder and tree view in the Sessions dialog box

Security

l RSA/DSA Public key, Password and Keyboard interactive user authentication

l RSA/DSA New Key Wizard and import/export key

l User authentication using Xagent (SSH user authentication agent)

l AES128/192/256, 3DES, BLOWFISH, CAST128, ARCFOUR and RIJNDAEL encryption algorithms

l SHA1, SHA1-96, MD5, MD5-96 and RIPEMD160 MAC algorithms

l zlib compression

l Host Keys dialog box

l User Keys dialog box

Terminal

l Unicode-based terminal buffer

l VT100, VT220, VT320, XTERM, LINUX, SCOANSI and ANSI terminals

l Multi-language output encoding (UTF-8)

l Compose bar to write messages to all sessions simultaneously

l Scroll buffer enabling up to 2,147,483,647 lines to be saved

l Character string search using regular expressions

l Column unit text selection

l Supports multi-byte character strings at copy & paste

l Designates delimiters of double-click word selection in the terminal window

l Triple click selects one line

l Bold font and ANSI color code

l Xterm terminal mouse

l Xterm 256-color mode

l Linux Meta key emulation

l Prints terminal screen

l Sets line spacing and margin in the terminal window

Tunneling

l TCP/IP and X11 forwarding

l Dynamic port forwarding using SOCKS4/5

l Tunneling pane allows you to monitor active forwarding channels and add new rules for the current session.

Appearance

l Convenient and powerful user interface

l Supports custom layout

l Adjustable toolbar

l Color schemes edit/import/export feature

l Changes cursor color and blinking

l Easily changes fonts via the Font button

l Designates frequently used character strings as quick commands

l Customizable Standard Buttons on toolbar

l Security–lock, session selection, and network up/down traffic information display in the status bar

l Full screen view (Alt+Enter)

l Transparency options

Local Command

l Local shell prompt for advanced users

l Local commands, including open, ssh, telnet, rlogin, sftp, and ftp

l Local Windows commands, such as ping, ipconfig, netstat, and nslookup

l Escapes to the local prompt during connection

Interoperability

l Interoperable with Xmanager program for X11 forwarding

l Interoperable with Xagent program for agent authentication and forwarding

l Interoperable with Xftp program for file transfer

l Edits scroll buffer in notepad

l Sequentially selects Xshell window via the menu command

File Management

l Sends and receives files via SFTP

l Sends and receives files via ZMODEM

l Sends ASCII files

l Automatic session logging (also saves terminal code)

l Page setting and print preview

See Also

About Xshell


Recommendations

Xshell 4 Help / Recommendations
Recommendations

l Processor: Intel® compatible

l Operating System: Microsoft Windows® 2000 SP4 or higher

l Storage Space: Reserve space of 50MB or more

l Network: TCP/IP network

l Program: Internet Explorer® 6.0 or higher

See Also

About Xshell


Install and Uninstall

Xshell 4 Help / Install and Uninstall
Install and Uninstall

The Xshell installation program was created using InstallShield®. A variety of installation options can be changed during installation. However, it is often sufficient to simply click [Next].

To uninstall Xshell, use the standard Windows add/remove functions. Run [Add/Remove Program] in the control panel and select to uninstall Xshell or Xmanager Enterprise from the list. Note that when Xmanager Enterprise is uninstalled, programs other than Xshell are also removed.

Even when the program is uninstalled, the registry information, log files and data files created by the user are not removed. The information and files are available for reuse when the program is reinstalled. If you want to remove all the files and registry information completely, remove the following explicitly:

Registry Information:

· \HKEY_CURRENT_USER\Software\NetSarang\Xshell

· \HKEY_CURRENT_USER\Software\NetSarang\Xmanager Enterprise

File and Folder:

· %APPDATA%\NetSarang\Xshell

· %APPDATA%\NetSarang\Xmanager Enterprise

See Also

About Xshell


Start

Xshell 4 Help / Start
Start

This section provides descriptions of the methods to create a TELNET/RLOGIN or SSH session and to connect to UNIX/Linux hosts. TELNET sessions are very simple. However, an SSH session occasionally requires a user key registration in the server prior to connection. If you need user key registration for SSH sessions, see ‘ Public Key User Authentication ’.

See Also

Create Session
Connect to Remote Host
Exit Xshell


Create Session

Xshell 4 Help / Create Session
Create Session

1. Select [New] from the [File] menu. New Session Properties dialog box is displayed.

Fig. 1: New Session Properties dialog box

2. Enter a session name in [Name].

3. Select an appropriate protocol from the [Protocol] list.

4. Enter server host name or IP address in [Host].

5. Enter port number used by the remote server in [Port Number].

6. Click [OK].

See Also

Start


Connect to Remote Host

Xshell 4 Help / Connect to Remote Host
Connect to Remote Host

The following is the process for connecting to a remote host via an SSH session. If a session is not available, see ‘ Create Session ’.

1. Select [Open] from the [File] menu. Sessions dialog box is displayed.

2. Select session for connection from the sessions list and click [Connect]. SSH User Name dialog box is displayed.

Fig. 1: SSH User Name dialog box

3. Enter user name and click [OK]. SSH User Authentication dialog box is displayed.

Fig. 2: SSH User Authentication dialog box

4. To attempt Password authentication, enter password in [Password] and click [OK].

5. To attempt Public Key authentication, first select a user key from the list. Enter [Passphrase] of the selected user key and click [OK].

* Note

If a user key is not available, see ‘ Public Key User Authentication ’.

6. To attempt Keyboard Interactive authentication, click [OK] and answer the questions given during connection process.

See Also

Start


Exit Xshell

Xshell 4 Help / Exit Xshell
Exit Xshell

To disconnect with a session, enter ‘exit’ in the terminal screen prompt or select [Disconnect] from the [File] menu.

* Note

If a session is disconnected with [Revert to local shell when connection is closed] option selected, the session tab is maintained in the local shell status. Under local shell status, Xshell prompt is displayed in terminal screen and local commands, such as open, telnet, ssh, and ping can be executed.

To end Xshell, select [Exit] from the [File] menu.

See Also

Start


Session Management

Xshell 4 Help / Session Management
Session Management

Session is a file containing information about remote host connection setup. By creating a session, users can set different options for different remote hosts. The Sessions dialog box shows all sessions created and enables to create and edit sessions.

Users can connect to a remote computer without creating a session. For this purpose, Xshell provides a default session which is ready to use after installation.

See Also

Session Management
Session Properties
Export
Import


Session Management

Xshell 4 Help / Session Management
Session Management

To Create a New Session:

1. Open the New Session Properties dialog box by selecting [New] in the [File] menu.

2. Enter connection information.

3. Click [OK].

To Open the Sessions Dialog Box:

· Select [Open] in the [File] menu.

· Click the standard [Open] button.

To Edit a Session:

1. Open the Sessions dialog box.

2. Select a session to edit.

3. Click the standard [Properties] button.

4. Click [OK] after completing session editing.

To Rename a Session:

1. Open the Sessions dialog box.

2. Right-click on the session to rename.

3. Select [Rename] in menu.

* Note

Session name must be a valid file name.

To Copy a Session Under Different Name:

1. Open the Sessions dialog box.

2. Select a session to copy under a different name.

3. Click the standard [Save As] button.

To Delete a Session:

1. Open the Sessions dialog box.

2. Select a session to delete.

3. Click the standard [Delete] button.

To Create a Shortcut to Session:

1. Open the Sessions dialog box.

2. Select a session for which to create shortcut.

3. Click the standard [Create Shortcut] button.

4. Select a folder to save shortcut.

5. Click [OK].

To Change Default Session Properties:

To open the default Session Properties dialog box, select one of the following:

· Select [Properties] from the [File] menu in local shell.

· Click the arrow next to the standard [Properties] button in the main toolbar and select [Default Session] from the list.

* Note

Default session is used when connecting with SSH, TELNET, RLOGIN and SFTP using a local prompt or the Address Bar.

To use a connection command in local prompt, see ‘ Xshell Local Command ’. For connection using address bar, see ‘ Address Bar ’.

To Create a New Session Folder:

1. Open the Sessions dialog box.

2. Click an arrow next to the standard [New] button and select [Folder] from the list.

3. Enter folder name.

To Copy a Session file to Another Computer:

1. Open the Sessions dialog box.

2. Click the standard [Open Session Folder] button.

3. Copy a session file (*.xsh) or email it to another computer.

4. Save session file in the following folder.

‘%APPDATA%\NetSarang\Xshell\Sessions’

See Also

Session Management


Session Properties

Xshell 4 Help / Session Properties
Session Properties

Open the Session Properties dialog box to create a new session or to edit a session.

To Open the Session Properties Dialog Box:

· Select [New] from the [File] menu.

· Select [Properties] from the [File] menu.

· Click the standard [Properties] button.

See Also

Session Management
Connection
Connection > Authentication
Connection > Authentication > Login Prompts
Connection > Login Scripts
Connection > SSH
Connection > SSH > Security
Connection > SSH > Tunneling
Connection > SSH > SFTP
Connection > TELNET
Connection > RLOGIN
Connection > SERIAL
Connection > PROXY
Terminal
Terminal > Keyboard
Terminal > VT Mode
Terminal > Advanced
Appearance
Appearance > Margins
Advanced
Advanced > Tracing
Advanced > Logging
ZMODEM


Connection

Xshell 4 Help / Connection
Connection

In connection setting, information about session connections may be set. In most cases, users can connect to a remote host with the connection setting only.

Name

Enter an intrinsic name for the session. The name becomes the session file name, and must comprise valid characters for a file name.

Protocol

Select a connection protocol to use when connecting to a remote computer. The protocols supported are SSH, SFTP, TELNET, RLOGIN and SERIAL.

Host

Enter host name or IP address of the remote computer.

Port Number

Enter the port number of the protocol selected above. When a protocol is selected from the protocols list, the default protocol port number is automatically entered. If a remote computer is using another port number, the port number must be directly entered. Default port numbers for each protocol are 22 for SSH/SFTP, 23 for TELNET and 513 for RLOGIN.

Send keep alive messages while this session is connected

Send keep alive messages to a remote computer. This is useful when connection is unexpectedly closed while connection is idle. In some network environments, the gateway or firewall system forces a disconnection if data transfer is not made for a prescribed period of time.

Reconnect automatically if connection is terminated unexpectedly

Reconnect automatically when a network connection is terminated unexpectedly.

See Also

Session Properties


Connection > Authentication

Xshell 4 Help / Connection > Authentication
Connection > Authentication

In user authentication setting, the authentication method, user name, password, user key, and the like may be designated

Method

Select an authentication method among Password, Public Key, and Keyboard Interactive. If the selected authentication method is not supported by the SSH server, a dialog box asking about user authentication method is displayed during connection.

User Name

Enter a user name for login. User name is the remote computer login account. If this field is left blank, a dialog box asking for the user name is displayed during connection.

Password

Enter a remote user account password. This value is valid when Password authentication is selected. If this field is left blank, a dialog box asking for the user authentication is displayed during connection. The password is encoded and saved in user’s PC. For greater security, leave this field blank.

User Key

Select a user key to use when public key authentication is selected. If this field is left blank, a dialog box asking about user authentication is displayed during connection. If a user key is not in the list, a key must be created and registered in a remote SSH server.

Passphrase

Enter passphrase for the selected user key. The entered key passphrase is encoded and saved in user’s PC. For greater security, leave this field blank.

See Also

Session Properties


Connection > Authentication > Login Prompts

Xshell 4 Help / Connection > Authentication > Login Prompts
Connection > Authentication > Login Prompts

It is necessary for Xshell to recognize the server user name/password prompt in order to automate the login process for TELNET or RLOGIN protocol. In general, the default value is used.

TELNET

Enter user name and password prompt to automate TELNET login process. Note that blanks are recognized as valid characters.

RLOGIN

Enter password prompt for RLOGIN protocol. Password may not be needed according to RLOGIN server settings. Note that blanks are recognized as valid characters.

See Also

Session Properties


Connection > Login Scripts

Xshell 4 Help / Connection > Login Scripts
Connection > Login Scripts

For login script setting, commands to be automatically entered in the terminal may be defined. After successful login to a remote server, commands are sequentially executed in the order displayed in the list. This feature is very useful when you login to another server after the first login to a remote server.

Execute the Following Expect and Send Rule

Select this option to use expect and send rule.

Add

Open the Expect and Send Rule dialog box. When rules editing is complete, the rule is added to the list.

Edit

Open the Expect and Send Rule dialog box and edit the selected rule.

Execute script when session starts.

Set a script file to execute after a session connection.

See Also

Session Properties


Connection > SSH

Xshell 4 Help / Connection > SSH
Connection > SSH

Set general SSH protocol options.

Protocol Versions

Select an SSH protocol version to use. SSH2 is safer than SSH1 and offers more capabilities.

Use Xagent (SSH Agent) for Handling Passphrase

Select this option when using Xagent. Using Xagent, entering a passphrase is not required during the public key user authentication process.

Launch Xagent Automatically

Xagent is automatically executed when necessary. When this option is selected, users do not need to execute Xagent in advance.

Use ZLIB Compression

A compression algorithm is used to compress all SSH connection data. In an environment where network speed is slow, use this option to improve the speed.

Do Not Allocate a Terminal

Select this option when not using terminal. Use this option if you want to use tunneling only without terminal access.

See Also

Session Properties


Connection > SSH > Security

Xshell 4 Help / Connection > SSH > Security
Connection > SSH > Security

Encryption

Encryption algorithms are used to encrypt and decrypt network traffics. Users may select preferred encryption algorithm from the list. If <Cipher List> is selected from the list, multiple algorithms may be attempted in the order appeared in the list. To edit the list of <Cipher List>, click [Edit].

MAC (Message Authentication Code)

MAC is added in SSH2 for greater security and to ensure data integrity. If <MAC List> is selected from the list, multiple algorithms are tried in the order appeared in the list. To edit the list of <MAC List>, click [Edit].

See Also

Session Properties


Connection > SSH > Tunneling

Xshell 4 Help / Connection > SSH > Tunneling
Connection > SSH > Tunneling

In the tunneling setting, TCP/IP, Dynamic and X11 forwarding rules may be set. These settings are valid only when the SSH protocol is selected in Connection setting.

For details on tunneling setting, see ‘ Tunneling Service ’.

See Also

Session Properties


Connection > SSH > SFTP

Xshell 4 Help / Connection > SSH > SFTP
Connection > SSH > SFTP

Set SFTP protocol related options.

Startup Folder

Set a local and remote folder with which to start after successful login via SFTP protocol.

See Also

Session Properties


Connection > TELNET

Xshell 4 Help / Connection > TELNET
Connection > TELNET

Set TELNET protocol related options.

Use XDISPLOC Telnet Option

Uses XDISPLOC Telnet option to pass display (PC X server) information to server. If you are using a PC X server such as Xmanager, use this option to execute remote X11 applications from a local PC.

Display

Enter the DISPLAY value to pass upon login. $PCADDR value is translated automatically to IP address of a local PC right before it is passed to server.

See Also

Session Properties


Connection > RLOGIN

Xshell 4 Help / Connection > RLOGIN
Connection > RLOGIN

Set RLOGIN protocol related options.

Terminal Speed

Designate terminal speed to be passed to rlogin server.

See Also

Session Properties


Connection > SERIAL

Xshell 4 Help / Connection > SERIAL
Connection > SERIAL

In serial setting, serial connection options may be set. Instead of using the traditional terminal environment, RS232C SERAL connection lets you use your PC to connect to UNIX machines that has no graphic card support or where direct access to console is not available. To use Serial connection through Xshell, serial interface must be installed in the host system.

For details on serial setting, see ‘ Serial Connection ’.

See Also

Session Properties


Connection > PROXY

Xshell 4 Help / Connection > PROXY
Connection > PROXY

Proxy Server

Select a proxy server to use in this session.

For details on proxy setting, see ‘ Proxy Setting ’.

See Also

Session Properties


Terminal

Xshell 4 Help / Terminal
Terminal

In terminal setting, terminal types and other related options may be set.

Terminal Type

Select a terminal type to use. Xshell supports VT100, VT102, VT220, VT320, ANSI, SCOANSI, LINUX and XTERM terminals.

Use the Following Terminal Size when Connected

Select this option to designate the terminal size in this session. When this option is selected, terminal size is initialized with columns and rows values when a session is connected. If the option is not selected, terminal size does not change even when a session is connected.

Rows

Enter row count in terminal. Terminal size is adjusted when a session is connected.

Columns

Enter column width in terminal. Terminal size is adjusted when a session is connected.

Scroll Buffer

Designate the row unit scroll buffer size.

Push Erased Screen into Scroll Buffer

Even when terminal screen is erased with the ‘clear’ command, the erased content remains in the scroll buffer. The previous screen may thus be viewed via mouse scroll.

Encoding

Select terminal output encoding. This value must be a language the remote server uses. If Default Language is selected, Xshell uses the Windows encoding. This option does not change the keyboard input value and, when required, the IME (Input Method Editor) provided by Windows must be appropriately installed.

Treat CJK Ambiguous Characters as Wide Characters

Recognize ambiguous CJK (Chinese, Japanese, and Korean) characters as wide characters.

See Also

Session Properties


Terminal > Keyboard

Xshell 4 Help / Terminal > Keyboard
Terminal > Keyboard

In the keyboard setting, users may set the character string sent by their PC’s keyboard to the server.

Function Key Emulation

Set function keys appropriate for your terminal type. If <Default> is selected, the function key is automatically assigned according to the terminal type designated in the ‘ Terminal ’ setting.

Specify an Alternate Key Mapping File

Using a custom key mapping file, users can manually assign a string to each function key (F1~F20) and it will be sent to server when pressed.

Delete Key Sequence, Backspace Key Sequence

Select a character string to be sent when user presses the Delete or Backspace key.

Meta Key Emulation

Enable meta key emulation for application programs which use meta keys, such as Emacs.

See Also

Session Properties


Terminal > VT Mode

Xshell 4 Help / Terminal > VT Mode
Terminal > VT Mode

Set the initial values for each terminal mode.

Auto Wrap Mode (DECAWM)

Activate auto wrap mode at startup.

Origin Mode (DECOM)

Activate origin mode. When this option is activated, the cursor moves based on the location designated by the server.

Reverse Video Mode (DECSCNM)

Enables Reverse Video Mode when the session starts. When this option is activated, the screen foreground and background colors are reversed.

New Line Mode (NLM)

Enables New Line Mode when the session starts. When this option is activated, both CR and LF are sent when Enter key is pressed. If this option is not selected, Enter key sends CR only.

Insert Mode (IRM)

Enables Insert Mode. When this option is selected, characters received from the remote server are inserted into where the cursor is located and the existing characters are not erased.

Echo Mode (SRM)

When this option is activated, a character string to send to server is displayed on screen and then transferred to server.

Initial Cursor Key Mode (DECCKM)

Set initial cursor key mode value.

Initial Numeric Keypad Mode (DECNKM)

Set default setting for Keypad mode.

See Also

Session Properties


Terminal > Advanced

Xshell 4 Help / Terminal > Advanced
Terminal > Advanced

Set advanced terminal options.

Restrict Mouse Use at Terminal with Shift Key

Some applications such as ‘vi’ and ‘mc’ can use mouse click and drag to make selection or change directory. Even in these applications, when this option is selected, press Shift key while using mouse and Xshell uses the mouse input to perform actions such as making selection on the screen.

Erase Screen Using Background Color

Use the current terminal background color rather than the background color set in color scheme when erasing screen.

Receive LF as CR+LF

Display both CR and LF in terminal screen when LF is received from server.

Scroll to the Bottom when Pressing the Key

Scroll to the bottom of the terminal screen when a user enters a key.

Scroll to the Bottom at Terminal Input/Output

Scroll to the bottom of the screen when text is displayed on the terminal screen.

Enable Destructive Backspace

Erase a letter to the left of the cursor, when the Backspace key is pressed, and move the cursor to the erased character’s position.

Disable Blinking Text

Blinking texts do not blink and are displayed with solid color.

Disable Terminal Title Change

Do not change the Xshell title bar. In most cases, the title bar displays the folder and host name according to a request from a remote computer.

Disable Terminal Printing Feature

Display the terminal on screen without printing it when a request for terminal printing is received from server.

Disable Switching to Alternate Terminal Screen

Do not use an alternate screen for certain application programs, such as vi. When an alternate screen is used, and the application is terminated, the terminal area goes back to the screen before the application is started.

Disable Terminal Size Change upon Request

Ignore a terminal size change signal from the server.

See Also

Session Properties


Appearance

Xshell 4 Help / Appearance
Appearance

In the appearance setting, the terminal window colors and fonts may be set.

Color Scheme

Select a color scheme. Xshell provides several default color schemes. Add a new color scheme or edit an existing color scheme in the Select Color Scheme dialog box.

Font Name

Select a font. Only fixed width fonts are listed. A font may also be selected by pressing the standard [Fonts] button.

Font Size

Select the desired font size.

Bold

Select a method to express bold characters.

Cursor

Designate cursor color, appearance and blinking.

See Also

Session Properties


Appearance > Margins

Xshell 4 Help / Appearance > Margins
Appearance > Margins

In margins setting, set the margins and spacing in Xshell terminal window.

Margin

Set terminal window margins.

Spacing

Set spacing between lines and characters in the terminal window.

See Also

Session Properties


Advanced

Xshell 4 Help / Advanced
Advanced

In advanced setting, set quick command set, tracing, and log options.

Quick Command Set

Select the default quick command set to be used in a session. The selected quick command set is displayed in the quick command bar when the session is started.

Disable Shortcut Key to Quick Command

Ctrl+F1 and Ctrl+F2 keys are not used as shortcut keys to quick commands. The corresponding key values are sent to the server.

See Also

Session Properties


Advanced > Tracing

Xshell 4 Help / Advanced > Tracing
Advanced > Tracing

In tracing setting, set protocol tracing options. This feature will be helpful when you want to trace detailed protocol messages to solve a specific problem. A tracing message is displayed in terminal screen.

SSH Version, Algorithm Exchange and User Authentication

Display information about version exchange, encoding algorithm, compression method, and server and user authentication.

SSH TCP/IP and X11 Tunneling

Display port forwarding information on screen.

TELNET Option Negotiation

Display the TELNET option exchange process between Xshell and the telnet server on the screen.

See Also

Session Properties


Advanced > Logging

Xshell 4 Help / Advanced > Logging
Advanced > Logging

In logging setting, set the options related to log creation.

Start Logging when Connection is Made

Logging is automatically started when a session is connected to a remote host. Select one of the following logging options.

· Record printable texts only

· Record terminal codes in additon to printable texts

Automatically Create a New File in Log Folder

Create a new file in the default folder designated by the program and record log messages. A file name is automatically generated.

Use the Following File

Save log messages in user designated log file in a user designated folder.

File Path

Designate the log file path. When a file is created, %n, %d and %t are translated into name, date and time respectively.

Browse Button ([…])

Open the Save As dialog box and select a file to record log contents.

Overwrite when the Specified File Already Exists

If thespecified file already exists, overwrite the log contents on the file. If this option is not selected, serial numbers are added to the end of the file name and an intrinsic name file is created.

Ask when Session Logging Starts

Open the Save dialog box when logging starts so users can select a file in which to save log.

See Also

Session Properties


ZMODEM

Xshell 4 Help / ZMODEM
ZMODEM

In ZMODEM setting, set various options relating to ZMODEM file transfer.

Automatically Activate ZMODEM

Automatically start file send/receive when remote ZMODEM program starts send/receive. If this option is not set, the file must be received by selecting [Send/Receive with ZMODEM] in [File] > [Transfer] menu.

Always Ask Before Download

Open the Browse For Folder dialog box before receiving files. It allows you to specify a different folder for each download.

Use the Following Download Path

Save a received file in a designated folder without asking for a folder in which to save the file. If a file of the same name already exists, serial numbers are added to the file name.

Automatically Change Name

If a file to be received via ZMODEM exists already, the file name is automatically changed. Ex.) Before: abc.txt, After: abc (2).txt

Overwrite

If a file to be received via ZMODEM exists already, the existing file is overwritten.

See Also

Session Properties


Export

Xshell 4 Help / Export
Export

Sessions exported by Xshell are collected into a single convenient file. When this file is imported from another computer where Xshell is installed, the imported sessions may be used without additional setup.

To Export Session:

1. Select [Export] from the [File] menu. The Import/Export Sessions wizard is displayed.

2. Select the position where the exported file is to be saved and click [Next]. Session export results will be displayed.

3. Click [Finish] to complete sessions export.

See Also

Session Management


Import

Xshell 4 Help / Import
Import

Xshell can import sessions exported by other computers.

To Import Session:

1. Select [Import] from the [File] menu. The Import/Export Sessions wizard is displayed.

2. Directly enter the file path exported from other computer or click the […] button to select the exported file and click [Next]. Sessions are imported and the result is displayed.

3. Click [Finish] to complete session import.

See Also

Session Management


Connection

Xshell 4 Help / Connection
Connection

Xshell provides various connection methods, such as Sessions dialog box, local prompt, address bar, links bar and shortcut to session.

See Also

Connection without Sessions
Connection with Sessions
Serial Connection
Connection with Xactivator
Proxy Setting


Connection without Sessions

Xshell 4 Help / Connection without Sessions
Connection without Sessions

To Connect at the Local Prompt:

1. Enter one of the following commands in the local prompt:

Xshell:\> telnet hostname

Xshell:\> ssh hostname

Xshell:\> rlogin hostname

* Note

A port number must be designated if a remote host does not use the default port number. For information on commands, see ‘ Xshell Local Command ’.

To Connect at the Address Bar:

1. Enter one of the following commands in the address bar:

· telnet://hostname

· ssh://hostname

· rlogin://hostname

2. Press Enter or click [Connect].

* Note

A user name and port number may be entered in the address bar. For details, see ‘ Address Bar ’.

See Also

Connection


Connection with Sessions

Xshell 4 Help / Connection with Sessions
Connection with Sessions

To Connect at the Sessions Dialog Box:

1. Open the Sessions dialog box.

2. Select a session for connection.

3. Click [Connect].

* Note

If a remote host connection already exists, a new tab is opened or a new Xshell is started.

To Connect at the Local Prompt:

1.   Enter the following command in Xshell local prompt.
Xshell:\> open session

To Connect with a Shortcut:

1. Double-click the shortcut icon of a session.

* Note

To obtain information about shortcut to session, see ‘ Session Management ’.

See Also

Connection


Serial Connection

Xshell 4 Help / Serial Connection
Serial Connection

RS232C Serial connection lets you use your PC as a terminal when there is no video card in UNIX system or the console is not directly accessible. To use Serial connection via Xshell, serial interface must be installed in the host system.

To Make Serial Connection:

1. Select [New] from the [File] menu. New Session Properties dialog box is displayed.

2. Enter a session name in [Session].

3. Select SERIAL from [Protocols] list.

4. Select [SERIAL] from [Category].

5. Select the RS232C serial port number connected with PC where Xshell is installed from [Port].

6. Select communication speed in [Baud Rate]. The value must match the server value. In general, 9600 is used.

7. Select the transferred data unit bit count in [Data Bits]. It must match the server value.

8. Select number of bits to indicate the end of data unit in [Stop Bits]. Make a selection according to server settings.

9. [Parity] is to verify errors in transferred data. Select one from none, odd, even, mark and space according to server settings.

10. Create a new session by clicking [OK].

11. Make a connection as described in ‘ Connection with Sessions ’ with the created session.

See Also

Connection


Connection with Xactivator

Xshell 4 Help / Connection with Xactivator
Connection with Xactivator

Xactivator is executed as an icon in notification area. Using Xactivator, a new session connection can be started or a new Xshell window opened easily. You can also use Xactivator to open/close Xshell windows that are open.

To Start Xactivator:

1. Select [Launch Xactivator] from the [Tools] menu. Xactivator is executed and an icon is created in the notification area.

To Start New Session Connection in Xactivator:

1. Right-click on the Xactivator icon in the notification area.

2. Place mouse over of the popup menu [Sessions] and list all sessions in the submenu.

3. Select a session for connection.

See Also

Connection


Proxy Setting

Xshell 4 Help / Proxy Setting
Proxy Setting

Proxy server mediates between a network to which a user belongs and an external network to be connected with.

Add, edit and delete a proxy server in Proxy List dialog box.

To Add Proxy Server:

1. In [Connection > Proxy] category of Session Properties dialog box, click [Browse] in [Proxy Server].

2. Click [Add] in Proxy List dialog box. Proxy Settings dialog box is displayed.

3. Enter proxy server name, proxy server type, host information and user information.

4. Press [OK] to add proxy server.

See Also

Connection


Security

Xshell 4 Help / Security
Security

Xshell provides public key user authentication.

Host key and user key database created in Xshell may be used in Xmanager and Xftp programs. Once a public key is created, it may be used in other programs without an additional configuration.

See Also

Public Key User Authentication
Host Key Management


Public Key User Authentication

Xshell 4 Help / Public Key User Authentication
Public Key User Authentication

For public key user authentication, a pair of user keys must be created comprising a public key and a private key. While public key authentication is carried out, the private key is used by Xshell to create user signature and the public key is used by SSH server to check the signature.

A user key may be created from SSH server or Xshell. If the user key is created from server, the private key must be registered in the Xshell private key repository using Xshell import. If the user key is created from Xshell, the public key must be registered in the server.

To Create a User Key:

1. Select [New User Key Wizard] from the [Tools] menu.

2. Create a user key according to instructions given by the New User Key Wizard.

* Note

Register a public key on a server at the last stage of key creation. Registration methods vary depending on server types.

· SSH1: Copy the public key text and save it to $HOME/.SSH/authorized_keys file. Execute the following command to turn off the write permission of the files and directories.
$ cd
$ chmod go-w . .SSH .SSH/authorized_keys

· SSH2-OpenSSH: OpenSSH servers use this format. Copy the public key text and save it to $HOME/.SSH/authorized_keys2 file. Execute the following command to turn off the write permission of the files and directories.
$ cd
$ chmod go-w . .SSH .SSH/authorized_keys2

· SSH2-IETF SECSH: Certain commercial SSH servers, such as ssh.com server, use this format. Save a public key under an intrinsic name, such as mypublickey.pub and copy it to $HOME/.ssh2 directory. Add the following line to $HOME/.ssh2/authorization file:
Key mypublickey.pub
Execute the following command to turn off the write permission of the files and directories.
$ cd
$ chmod go-w . .ssh2
$ chmod go-w .ssh2/authorization .ssh2/mypublickey.pub

To Register Public Key in Server:

1. Open the User Keys dialog box by selecting [User Key Manager] from the [Tools] menu.

2. Select a user key to register.

3. Click [Properties]. User Key Properties dialog box is displayed.

4. Click the [Public Key] tab.

5. Select an appropriate type from the [Public Key Format] list.

6. Click [Save as a file] to save or copy the key content and register the key to the server according to the public key registration method above.

To Change Passphrase to User Key:

1. Open the User Keys dialog box.

2. Select a user key for which to change the passphrase.

3. Click [Properties]. User Key Properties dialog box is displayed.

4. Click the [General] tab.

5. Click [Change Passphrase].

* Note

Import, export, rename, delete and create a user key in the ‘ User Keys Dialog Box ’.

See Also

Security
User Keys Dialog Box


User Keys Dialog Box

Xshell 4 Help / User Keys Dialog Box
User Keys Dialog Box

The User Keys dialog box enables the creation and management of user keys. Open this dialog box by selecting [User Key Manager] from the [Tools] menu.

Import

Select a user key file and import it by opening the Open dialog box. At present, Xshell can read the SSH1 protocol RSA key, the OpenSSH SSH2 protocol RSA/DSA key, the SSH.com key and the NetSarang Computer user key formats(*.pri).

Export

Save a selected user key file by opening the Save dialog box. Exported file types are NetSarang user key or OpenSSH SSH2 format. NetSarang Computer user key format files(*.pri) can be used in programs developed by NetSarang Computer, Inc.

Delete

Delete a selected user key from database.

Rename

Rename a selected user key. Key name must be valid as a file name.

Properties

Show user key attributes. Type, length, fingerprint, and public key may be viewed, and the key passphrase may be changed.

Create

Open the New User Key Wizard.

See Also

Public Key User Authentication


Host Key Management

Xshell 4 Help / Host Key Management
Host Key Management

A host key is a remote host public key, and users can verify the host via its fingerprint. When a connection is made, the remote host sends its public key to Xshell. When the host key is valid and you trust it, you can save the host key to the database in Xshell. If a host key is not saved in the database, the SSH Security Warning dialog box will appear when you try to connect to the host.

See Also

Security
SSH Security Warning Dialog Box
Host Keys Dialog Box


SSH Security Warning Dialog Box

Xshell 4 Help / SSH Security Warning Dialog Box
SSH Security Warning Dialog Box

The SSH Security Warning dialog box is displayed when a remote host key is not saved in the host key database or the fingerprints of the remote host key and the saved host key are different.

Accept Once

Accept host key for this connection only. The host key is not saved and the same dialog box opens at the next connection. This is useful when a server host key changes often or the user rarely connects to the server.

Accept and Save

Save host key and continuously process connection. This dialog box does not open on the next connection. This is useful when the fingerprint is correct and the user connects to the host frequently.

Cancel

Host key is not accepted and connection is cancelled.

See Also

Host Key Management


Host Keys Dialog Box

Xshell 4 Help / Host Keys Dialog Box
Host Keys Dialog Box

The Host Keys dialog box permits users to manage host keys of remote hosts to which connection is allowed.

Import

Import a host key by opening the Open dialog box. The imported host key is saved in the host key database. Files saved in the SECSH public key format can be imported.

Export

Export a selected host key by opening the Save dialog box. The exported keys are saved in the SECSH public key format and can be used in other programs.

Delete

Delete a selected host key from database.

View

Open a selected host key with notepad.

See Also

Host Key Management


Tunneling Service

Xshell 4 Help / Tunneling Service
Tunneling Service

Xshell provides TCP/IP and X11 forwarding functions, which creates a secure tunnel between a user’s PC and another computer connected across an unreliable network enviornment and can therefore safely transmit data.

See Also

TCP/IP Port Forwarding
X11 Forwarding
SOCKS4/5 Dynamic Port Forwarding
Instant Tunneling


TCP/IP Port Forwarding

Xshell 4 Help / TCP/IP Port Forwarding
TCP/IP Port Forwarding

To use port forwarding service via a secure tunnel, define port forwarding rules for each application program.

* Note

For local forwarding, connection to a local PC’s listening port is forwarded to a specific destination host port.

For remote forwarding, connection to the remote host listening port is forwarded to a specific destination host port.

Dynamic forwarding works the same as local forwarding. It automatically determines the host of delivery destination and port according to the SOCKS protocol. The default port number of SOCKS protocol is 1080.

To Add New Port Forwarding Rule to Session:

1. Open the Sessions dialog box.

2. Select a session for which to edit port forwarding rule.

3. Click the standard [Properties] button.

4. Select [Connection > SSH > Tunneling] from [Category].

5. Click [Add] to open the Forwarding Rule dialog box.

6. Select connection type from the [Type] list.

7. Enter localhost or IP address in [Source Host].

8. Enter port number in [Listening Port] or select a service name.

9. Enter the name of the host or IP address where the server program operates in [Destination Host].

10. Enter port number where server program is waiting in [Destination Port].

11. Enter a description of the forwarding rule in [Description].

12. Click [OK].

To Change Forwarding Rule:

1. Open the Sessions dialog box.

2. Select session for which to edit port forwarding rule.

3. Click the standard [Properties] button.

4. Select [Connection > SSH > Tunneling] from [Category].

5. Select a forwarding rule to change.

6. Click [Edit].

To Remove Port Forwarding Rule:

1. Open the Sessions dialog box.

2. Select session for which to edit port forwarding rule.

3. Click the standard [Properties] button.

4. Select [Connection > SSH > Tunneling] from [Category].

5. Select a forwarding rule to remove.

6. Click [Remove].

See Also

Tunneling Service


X11 Forwarding

Xshell 4 Help / X11 Forwarding
X11 Forwarding

X11 forwarding is a special TCP/IP port forwarding case. The X11 protocol is used by PC X server software and the connection is established to a user PC from a remote host. It is thus the reverse situation from other client programs, such as email or telnet. Using X11 forwarding, remote X11 application programs can be used in a user’s PC via a secure encoding tunnel without complicated port forwarding setting.

To use the X11 forwarding service, you should configure both Xshell and SSH server.

To Activate X11 Forwarding in Xshell:

1. Open the Sessions dialog box.

2. Select a session for which to activate X11 forwarding.

3. Click the standard [Properties] button.

4. Select [Connection > SSH > Tunneling] from [Category].

5. Select [Forward X11 Connections to].

6. If Xmanager® is installed in the user’s PC, select [Xmanager]. If another PC X server is used, select [X DISPLAY] and enter an appropriate DISPLAY.

7. Click [OK].

* Note

In Xmanager, Xshell automatically finds X DISPLAY option. In other PC X server programs, the option must be set directly. If PC X server uses TCP 6000 port, DISPLAY is set as ‘localhost:0.0’.

To Activate X11 Forwarding in OpenSSH Server:

1. Open the /etc/ssh/sshd_config file.

2. Set X11Forwarding option value as follows:
X11Forwarding             yes

3. Restart SSH server.

To Activate X11 Forwarding in Ssh.com Server:

1. Open the /etc/ssh2/sshd2_config file.

2. Set AllowX11Forwarding option value as follows:
AllowX11Forwarding        yes

3. Restart SSH server.

See Also

Tunneling Service


SOCKS4/5 Dynamic Port Forwarding

Xshell 4 Help / SOCKS4/5 Dynamic Port Forwarding
SOCKS4/5 Dynamic Port Forwarding

Dynamic port forwarding is a method to forward a local network connection to an SSH server, where the destination host and port are automatically determined by the SOCKS protocol. Using dynamic port forwarding, Xshell can operate as a SOCKS proxy server.

To Add New Dynamic Port Forwarding Rule to Session:

1. Open the Sessions dialog box.

2. Select a session for which to edit port forwarding rule.

3. Click the standard [Properties] button.

4. Select [Connection > SSH > Tunneling] from [Category].

5. Open the Forwarding Rule dialog box by clicking [Add].

6. Select Dynamic (SOCKS4/5) from [Type] list.

7. Enter port number in [Listening Port] or select a service name. The SOCKS proxy server default port is 1080.

8. Click [OK].

* Note

For dynamic port forwarding, the destination host and port do not need to be entered.

See Also

Tunneling Service


Instant Tunneling

Xshell 4 Help / Instant Tunneling
Instant Tunneling

Instant tunneling enables users to add, remove, suspend, and resume a forwarding rule while a session is connected. The current session tunneling status can be checked in the tunneling pane. To view the tunneling pane, select [Tunneling Pane] from the [View] menu.

To Add Port Forwarding Rule in Tunneling pane:

1. Click the [Forwarding Rules] tab in tunneling pane.

2. Right-click on the list.

3. Select [Add] from menu. Forwarding Rule dialog box is displayed.

* Note

Newly added rules are applied to the current connection. Unless you save the rules, they are deleted when the connection is closed.

To Remove Port Forwarding Rule from Tunneling pane:

1. Click the [Forwarding Rules] tab in tunneling pane.

2. Right-click on a rule to remove from the [Forwarding Rules] list.

3. Select [Remove] from menu.

To Suspend Port Forwarding Rule:

1. Click the [Forwarding Rules] tab in tunneling pane.

2. Right-click on a rule to suspend from the [Forwarding Rules] list.

3. Select [Suspend] from menu.

To Retry Port Forwarding Rule:

1. Click the [Forwarding Rules] tab in tunneling pane.

2. Right-click on a rule to resume in the [Forwarding Rules] list.

3. Select [Resume] from menu.

* Note

Resume can only be executed for a previously suspended rule.

See Also

Tunneling Service


Terminal Window Operations

Xshell 4 Help / Terminal Window Operations
Terminal Window Operations

Xshell provides a succinct and powerful terminal window enabling users to simultaneously use the remote terminal and local prompt command interface. Terminal window provides a range of convenient functions, such as copy & paste, find character string, change font and font color, and advanced terminal options.

See Also

Copy and Paste
Find String
Font Change
Font Color and Background Color Setting
Cursor Change
Window Handling
Multi-session Handling
Quick Command Sets Setting
Terminal Output Encoding Change
Advanced Terminal Options Setting
Layout Management


Copy and Paste

Xshell 4 Help / Copy and Paste
Copy and Paste

To Select a Character String:

1. Do one of the following:

· Press the left mouse button at the starting point of an area to select. While pressing the button, move the mouse to the end of the area to be selected and release the button. The selected character string is displayed in an inverted color.

· Click the left mouse button at the starting point of an area to select. Move mouse to the end of the area. While pressing Shift key, press the left button once again.

· Double-click a word to select. The double-clicked word is selected.

· Click a row to select quickly three times. The entire row is selected.

To Select Character String in Column Unit:

1. Press Alt key.

2. Press the left mouse button at the starting point of an area to select. While pressing the button, move to the end of the area to select and release the button.

To Copy Selected Character String to Windows Clipboard:

1. Select a character string to copy.

2. Do one of the following:

· Click the [Smart Selection] button and select [Copy].

· Select [Copy] from the [Edit] menu.

· Click the standard [Copy] button.

· Press Ctrl+Insert key.

· If [Copy Selected Texts to the Clipboard Automatically] is set in options, the selected text is automatically copied.

To Copy Selected Character String to Notepad:

1. Select a character string to copy.

2. Do one of the following:

· Click the [Smart Selection] button and select [To Notepad].

· Point to [To Notepad] in the [Edit] menu and select [Selected Area].

* Note

The scroll buffer and current screen may be copied as well as the selected character strings. A notepad window is automatically displayed with the copied text. This does not copy character strings to the clipboard.

To Paste Clipboard Contents to Terminal Screen:

1. Do one of the following:

  • Select [Paste] from the [Edit] menu.
  • Click the standard [Paste] button.
  • Press Shift+Insert key.
  • If Paste the clipboard contents is selected for middle or right mouse button operation, click the corresponding mouse button.

To Set Xterm Style Copy and Paste:

1. Open the Options dialog box.

2. Click the [Keyboard and Mouse] tab.

3. Select [Mouse] – [Middle Button] operation as Paste the clipboard contents.

4. Select [Selection] - [Copy Selected Texts to the Clipboard Automatically].

5. Click [OK].

* Note

When a character string is selected, xterm program copies it to clipboard. When the middle mouse button is pressed, it is pasted to terminal screen.

See Also

Terminal Window Operations


Find String

Xshell 4 Help / Find String
Find String

Search scroll buffer using a specific keyword or a regular expression.

To Find with Keyword:

1. Select [Find] from the [Edit] menu.

2. Enter a keyword in Find dialog box.

3. Click [Find Next].

To Find with Regular Expression:

1. Select [Find] from the [Edit] menu.

2. Enter a keyword in Find dialog box.

3. Select [Regular Expression].

4. Click [Find Next].

* Note

For detailed information on regular expression, see ‘ Regular Expression ’.

See Also

Terminal Window Operations


Font Change

Xshell 4 Help / Font Change
Font Change

In terminal screen, characters must be displayed in rows and columns. In Xshell, only fixed width fonts may be selected.

To Change Terminal Font and the Font Size:

1. Do one of the following:

· Click the standard [Fonts] button and select a font and the font size.

· Select [Appearance] in Session Properties dialog box and select a font and the font size.

To Change Bold Text:

1. Open the Session Properties dialog box.

2. Select [Appearance] from [Category].

3. Select an option from [Bold] field.

* Note

As for Bold, either colors or bold font or both may be used.

See Also

Terminal Window Operations


Font Color and Background Color Setting

Xshell 4 Help / Font Color and Background Color Setting
Font Color and Background Color Setting

In a color scheme, font colors, background colors and ANSI 16 colors are saved. Xshell enables users to select/change color schemes anytime while using Xshell. The selected color scheme is applied immediately.

To Change Terminal Color:

1. Do one of the following:

· Click the standard [Color Schemes] button to display the Select Color Scheme dialog box. Select a color scheme in the dialog box and click [OK].

· Select [Appearance] from [Category] in Session Properties dialog box, select a color scheme from the [Color Scheme] and click [OK].

* Note

Xshell provides several default color schemes. Users may edit the existing color schemes or create new color schemes.

To Create New Color Scheme:

1. Open the Select Color Scheme dialog box.

2. Click [New]. A new color scheme is added to the list.

3. Select the new color scheme created.

4. Click [Edit]. Edit Color Scheme dialog box is displayed.

To Edit Color Scheme:

1. Open the Select Color Scheme dialog box.

2. Select a color scheme to edit.

3. Click [Edit]. Edit Color Scheme dialog box is displayed.

4. Select colors for normal text in [Normal Text].

5. Select colors for bold text in [Bold Text]. In general, colors lighter than the normal text are used for bold text.

6. [ANSI Colors] is used to express ANSI color code in terminal. The colors on top are for normal text, such as black, red, green, yellow, blue, magenta, cyan and white, and the colors on the bottom are for bold text.

To Export Color Scheme:

1. Open the Select Color Scheme dialog box.

2. Select a color scheme to export.

3. Click [Export]. Save dialog box is displayed.

4. Select a folder and enter the file name to save.

5. Click [Save].

* Note

Exported file is in ‘.xcs’ format and may be used in Xshell only. A number of color schemes may be saved in a single file. The color scheme names are also saved in the file.

To Import Color Scheme:

1. Open the Select Color Scheme dialog box.

2. Click [Import]. Open dialog box is displayed.

3. Select a color scheme file (.xcs) to import.

4. Click [Open].

See Also

Terminal Window Operations


Cursor Change

Xshell 4 Help / Cursor Change
Cursor Change

To Change Cursor Color:

1. Open the Session Properties dialog box.

2. Select [Appearance] from [Category].

3. Select [Cursor Color] value.

4. Select [Text Color] value.

5. Click [OK].

To Change Cursor Blinking:

1. Open the Session Properties dialog box.

2. Select [Appearance] from [Category].

3. Select or deselect [Use blinking cursor].

4. Click [OK].

To Change Cursor Blinking Speed:

1. Open the Session Properties dialog box.

2. Select [Appearance] from [Category].

3. Check [Use blinking cursor].

4. Enter cursor blinking speed by millisecond in [Speed].

5. Click [OK].

See Also

Terminal Window Operations


Window Handling

Xshell 4 Help / Window Handling
Window Handling

To Minimize to Notification Area:

1. Open the Options dialog box.

2. Click the [Advanced] tab.

3. Check [Minimize to the notification area] in [Window] options.

4. Save changes by clicking [OK].

To Minimize to Notification Area at Startup:

1. Open the Options dialog box.

2. Click the [Advanced] tab.

3. Check [Minimize to the notification area at Xshell startup] in [Window] options.

4. Save changes by clicking [OK].

To Exit Xshell when All Connections are Closed:

1. Open the Options dialog box.

2. Click the [Advanced] tab.

3. Check [Exit Xshell when all connections are closed] in [Session] options.

4. Click [OK].

To Exit to Local Shell when Connections are Closed:

1. Open the Options dialog box.

2. Click the [Advanced] tab.

3. Check [Revert to local shell when connection is closed] in [Session] options.

4. Click [OK].

To Create New Xshell Window:

1. Select [New Window] from the [Window] menu.

To Move to Another Xshell Window:

1. Select [Next] or [Previous] from the [Window] menu.

* Note

The same function may be executed using Alt+Right and Alt+Left keys.

To Close All Xshell Windows Simultaneously:

1. Select [Close All] from the [Window] menu.

To Close All Xshell Windows Except the Current Window:

1. Select [Close All but This] from the [Window] menu.

See Also

Terminal Window Operations


Multi-session Handling

Xshell 4 Help / Multi-session Handling
Multi-session Handling

‘Multi-session’ enables users to work and move between sessions using the sessions tab or sessions bar while maintaining multiple connections in a single Xshell window.

To Open the Multiple Sessions in Single Xshell Window:

1. Open the Options dialog box.

2. Click the [Advanced] tab.

3. Check [Open multiple sessions in a single Xshell window] in [Session] options.

4. Save changes by clicking [OK].

To Create New Connection in Sessions Tab:

1. Click the [+(Add Tab)] button at the far left of the sessions tab.

2. Select one from sessions list. The selected session is opened in a new tab.

To Create New Connection in Sessions Bar:

1. Click an icon at the far left of the sessions bar.

2. Select one from the sessions list. The selected session is opened in a new tab.

* Note

To create a new connection, use a session as described in ‘ Session Management ’ or try a connection without a session.

To Connect with a Remote Computer by Entering a Command in Local Shell:

1. To open a local shell, click the [+(Add Tab)] button of the sessions tab and select [Local Shell] or double-click a blank in the sessions tab.

2. In the local command prompt, connect to a remote computer using commands, such as ssh, telnet and sftp. For details on using command, enter ‘?’.

* Note

For detailed information on local commands, see ‘ Xshell Local Command ’.

To Move Between Sessions at Multi-session Connection:

1. Do one of the following:

· Click a sessions tab.

· Click a session button from the sessions bar.

· Use Ctrl+Tab, Shift+Tab or Ctrl+Shift+Tab.

· Move between sessions using Alt+’session number’.

To Connect with Session in New Xshell Window:

1. Select [New Terminal] from the [Window] menu or click the standard [New Terminal] button. A new Xshell window opens and connection is attempted with the same session information as the currently connected session.

See Also

Terminal Window Operations


Quick Command Sets Setting

Xshell 4 Help / Quick Command Sets Setting
Quick Command Sets Setting

By designating frequently used character strings as quick commands, Users can avoid repeated keyboard inputs and use simple mouse clicks to execute the commands. To display quick commands bar, check [Quick Commands] in the [View] menu.

To Add Quick Command Set:

1. Select [Quick Command Sets] in the [Tools] menu. Quick Command Sets dialog box is displayed.

2. Click [New].

3. Enter the new quick command set name.

* Note

To open the Quick Command Sets dialog box, click the [Quick Command Set] button(an icon at the far left) in the quick commands bar and select [Browse] from the list.

To Add Quick Command on Quick Commands Bar:

1. Click an undefined Quick Command button in the quick commands bar or press a shortcut key (Ctrl+F1, etc.). Edit Quick Command dialog box is displayed.

2. Enter the quick command name in [Label] and a frequently used command or character string in [Action] area.

3. Click [OK].

* Note

To edit the quick command set displayed in the quick commands bar, click the [Quick Command Set] button(an icon at the far left) on the bar and select [Edit] from the list. Edit Quick Command Set dialog box is displayed.

The order of quick commands listed in the quick command bar can be changed by dragging button.

To Add Quick Command to Quick Command Set:

1. Select [Quick Command Sets] from the [Tools] menu. Quick Command Sets dialog box is displayed.

2. Select a quick command set to which a quick command is to be added.

3. Click [Edit]. Edit Quick Command Set dialog box is displayed.

4. Select a quick command and click [Edit]. Edit Quick Command dialog box is displayed.

5. Enter the quick command name in [Label] and a frequently used command or character string in [Action] area.

6. Click [OK].

7. To add more quick commands, repeat the process from 4 to 6.

8. Click [OK] in Edit Quick Command Set dialog box.

* Note

In Edit Quick Command Set dialog box, add, delete, and edit quick commands. The order of quick commands listed in the quick command bar may be changed.

To Display Another Quick Command Set in Quick Commands Bar:

1. Click the [Quick Command Set] button(an icon at the far left) in quick commands bar and select a quick command set from the list. The buttons from the selected quick command set are listed.

To Select Quick Command Set Displayed when Session is Started:

1. Open the session’s Session Properties dialog box.

2. Select [Advanced] from [Category].

3. Select a quick command set to be used in session.

4. Press [Browse] and select the quick command set or create a new quick command set in Quick Command Sets dialog box.

5. Click [OK].

See Also

Terminal Window Operations


Terminal Output Encoding Change

Xshell 4 Help / Terminal Output Encoding Change
Terminal Output Encoding Change

Xshell uses the default user language in Windows system. Users can select and use various encodings which differ from the Windows system according to remote host encoding.

To Change Session Encoding:

1. Do one of the following:

· Click the standard [Encoding] button and select an encoding to use.

· Open the Session Properties dialog box and select [Terminal] from [Category] and select an encoding from the [Encoding] list.

2. Display UTF-8 Encoding:

· If a remote computer is set to support unicode (UTF-8) and to use UTF-8, use ‘Unicode (UTF-8)’ as encoding. UTF-8 encoding enables simultaneous output of character sets in various languages.

* Note

To correctly display the selected encoding, the selected encoding language pack must be installed in the Windows system concerned.

Encoding option does not change keyboard input values. If necessary, install the appropriate IME (Input Method Editor) provided by Windows.

See Also

Terminal Window Operations


Advanced Terminal Options Setting

Xshell 4 Help / Advanced Terminal Options Setting
Advanced Terminal Options Setting

To Change Scroll Buffer Size:

1. Open the Session Properties dialog box.

2. Select [Terminal] from [Category].

3. Enter number of rows to use in [Scroll Buffer].

4. Click [OK].

* Note

Scroll buffer size is a value between 0 and 2,147,483,647. 0 means that scroll buffer is not used.

To Change Terminal Type:

1. Open the Session Properties dialog box.

2. Select [Terminal] from [Category].

3. Select a terminal type from [Terminal Type].

4. Click [OK].

To Change Size at Terminal Startup:

1. Open the Session Properties dialog box.

2. Select [Terminal] from [Category].

3. Check [Use the following terminal size when connected] from the [Emulation] area.

4. Enter column size in [Columns].

5. Enter row size in [Rows].

6. Click [OK].

To Change Keypad Mode:

1. Open the Session Properties dialog box.

2. Select [Terminal > VT Modes] from [Category].

3. Select [Normal] or [Application] from [Initial Numeric Keypad Mode].

4. Click [OK].

See Also

Terminal Window Operations


Layout Management

Xshell 4 Help / Layout Management
Layout Management

Layout management enables users to save Xshell window layout according to their preference. In Manage Layout dialog box, change names or delete the saved layouts.

To Save Layout of the Current Xshell Window:

1. Select [Layout] from the [View] menu and select [Save As].

2. Enter [New name] in Save As dialog box.

3. Click [OK].

To Change Xshell Window to Another Layout:

· Select [Layout] from the [View] menu and select one from the layouts list.

· Press Alt+L to select one from the layouts list.

To Manage Registered Layouts List:

1. Select [Layout] from the [View] menu and select [Manage].

2. Delete the layout or rename it in Manage Layout dialog box.

See Also

Terminal Window Operations


Options Setting

Xshell 4 Help / Options Setting
Options Setting

In the Options dialog box, set global options applied to all sessions. The dialog box may be opened by selecting [Options] in the [Tools] menu.

See Also

Session Folder and Startup Session
History Clearing and Connection Log
Key Mapping Setting
Mouse Setting
Transparency Setting
Advanced Options


Session Folder and Startup Session

Xshell 4 Help / Session Folder and Startup Session
Session Folder and Startup Session

The Xshell session folder path can be changed. In the Sessions dialog box, all sessions of the changed path are displayed. Select a network folder to share sessions with other users.

To Change Session Folder:

1. Open the Options dialog box.

2. Enter [Session Folder Path] in the [General] tab.

To Register Sessions to Open at Startup:

1. Open the Options dialog box.

2. Click [Add] under the [Sessions to open at startup] list in the [General] tab.

3. Select a session file from Open dialog box.

See Also

Options Setting


History Clearing and Connection Log

Xshell 4 Help / History Clearing and Connection Log
History Clearing and Connection Log

In Clear History dialog box, clear history of address bar, compose bar, search keyword, local shell and connection log. In History Settings dialog box, designate a file to save connection log settings.

To Clear History:

1. Open the Options dialog box.

2. Click [Clear] in the [General] tab.

3. Select contents to clear from Clear History dialog box.

4. Click [Clear].

To Save Connection Log:

1. Open the Options dialog box.

2. Click [History] - [Settings] in the [General] tab.

3. Select [Log connection information on the following file.] from History Settings dialog box.

4. Enter a file to save information about connection server, connection protocol, connection time, exit time and connection time.

See Also

Options Setting


Key Mapping Setting

Xshell 4 Help / Key Mapping Setting
Key Mapping Setting

In Custom Key Mapping dialog box, currently set shortcut key combinations are listed. The user can add, delete, and edit key combinations.

To Change Key Mapping:

1. Open the Options dialog box.

2. Click the [Keyboard and Mouse] tab.

3. Click [Edit] in [Key Mapping]. Custom Key Mapping dialog box is displayed.

4. Select a key combination to change from [Current Key Setting] and click [Edit].

5. Select one from Menu, Send String, Run Script or Launch Application in [Type].

6. Enter the selected menu or character string in [Action].

7. Click [OK].

See Also

Options Setting


Mouse Setting

Xshell 4 Help / Mouse Setting
Mouse Setting

The middle and right mouse button actions can be individually selected. The delimiters to be used when selecting a word by double-clicking can be designated.

To Change Mouse Button Operation:

1. Open the Options dialog box.

2. Select one of the middle mouse button actions from the [Keyboard and Mouse] tab.

· Do nothing.

· Open the popup menu.

· Paste the clipboard contents (default value).

· Open Properties dialog.

3. Select one of the right button actions. The default action is [Open the popup menu].

To Change Delimiter for Selection by Double-clicking:

1. Open the Options dialog box.

2. Enter a delimiter to use when selecting a word in the [Keyboard and Mouse] tab [Selection] field.

See Also

Options Setting


Transparency Setting

Xshell 4 Help / Transparency Setting
Transparency Setting

Xshell offers transparency setting.

To Set Window to Appear Transparent:

1. Select [Transparent] from the [View] menu.

2. Open the Options dialog box.

3. Set transparency in the [View] tab.

4. Set [Opacity]. The smaller the opacity is, the more transparent the Xshell window becomes.

5. If [Make window opaque on mouse over] option is selected, Xshell window is displayed opaque while mouse is over the window even when it is set to display Xshell window transparent.

6. If [Always on Top when it is transparent] option is selected, Xshell window is displayed at the top of all windows.

See Also

Options Setting


Advanced Options

Xshell 4 Help / Advanced Options
Advanced Options

Advanced options can be set in the Options dialog box [Advanced] tab.

Switch to English input when ESC key is pressed

When ESC key is pressed to move to command mode while entering Korean in certain applications, such as vi and vim, the status is automatically changed to English input mode.

Disable bell

Set not to use bell ringers.

Use the Smart select button for easy copy and file download

Show or hide the [Smart Selection] button when selecting a terminal area with a mouse.

Minimize to the notification area

When Xshell is minimized, it is minimized to the notification area.

Show session tab in full screen mode

Show the sessions tab in full screen mode.

Show scroll bar in full screen mode

Show scroll bar in full screen mode.

Arrange cascade windows in current window size

Uses the current window size to cascade Xshell windows. When this option is not selected, Xshell windows are cascaded in default size.

Run Xshell at Windows startup

Xshell is automatically started when Windows is started.

Minimize to the notification area at Xshell startup

Minimize to the notification area when Xshell is started.

Open the Sessions dialog box at Xshell startup

Open the Sessions dialog box when Xshell is started.

Use Alt key to access menu

Open the menu by pressing Alt key.

Open the multiple Sessions in a single Xshell window

Open the multiple sessions in a single Xshell window. Move between sessions using the session tab or session bar.

Confirm to close connection when Xshell is terminated

Ask whether or not to terminate connected sessions when a program is terminated.

Make sure whether to disconnect when session is terminated

Ask whether to disconnect at session termination.

Revert to local shell when connection is closed

The session tab is maintained in local shell status when a connection is closed. In a local shell session, the Xshell prompt is displayed in terminal screen and local commands, such as open, telnet, ssh and ping can be executed. To view a list of commands, execute help or ? in the Xshell prompt.

Exit Xshell when all connections are Closed

When all connections are closed, Xshell program is ended.

See Also

Options Setting


File Transfer

Xshell 4 Help / File Transfer
File Transfer

Xshell allows sending or receiving files using SFTP and ZMODEM protocols.

See Also

File Transfer Using SFTP
File Transfer Using ZMODEM
File Transfer Using Xftp


File Transfer Using SFTP

Xshell 4 Help / File Transfer Using SFTP
File Transfer Using SFTP

SFTP is an SSH-based file transfer protocol. Compared to ZMODEM, it supports a safer and faster file transfer.

To Receive File with SFTP:

1. Connect with a host from which to receive a file using sftp command in local prompt.
Xshell:\> sftp hostname

2. Receive a file using get command in sftp prompt.
sftp:/home/user21> get filename

To Send File with SFTP:

1. Connect with a host to which to send a file using sftp command in local prompt.
Xshell:\> sftp hostname

2. Send a file using put command in sftp prompt.
sftp:/home/user21> put filename

See Also

File Transfer


File Transfer Using ZMODEM

Xshell 4 Help / File Transfer Using ZMODEM
File Transfer Using ZMODEM

Files transferred via ZMODEM are saved in a folder designated by a user. Users may designate different folders each time files are received.

To Receive File with ZMODEM:

1. Execute the following command in a remote host prompt:
$ sz file1 file2 …

* Note

If [Activate ZMODEM automatically] is set in the Session Properties, the file receive process will be started automatically, and the following process in No. 2 and 3 can be omitted.

2. Point to [Transfer] in the [File] menu.

3. Select [Receive with ZMODEM].

* Note

If the sz command does not exist in a remote host, users must install it directly. In most cases, similar commands exist.

To Receive File with ZMODEM in Xshell Terminal:

1. Select the name of a file to download in the Xshell terminal window. The [Smart Selection] button is displayed around the selected file name.

2. Click the [Smart Selection] button.

3. Select [Download with ZMODEM].

To Send File with ZMODEM:

1. Execute the following command in remote prompt:
$ rz

* Note

If [Activate ZMODEM automatically] is set in the Session Properties, the file send process will be started automatically, and the following process in No. 2 and 3 can be omitted.

2. Point to [Transfer] in the [File] menu.

3. Select [Send with ZMODEM].

4. Select a file to send.

5. To send a file as ASCII, select [Send File as ASCII].

6. Click [Open].

To Send File with ZMODEM Using Drag & Drop:

1. Select a Windows file to upload.

2. Drag the file and drop it in Xshell terminal window.

File transfer is carried out automatically.

To Change Default Folder to Save File:

1. Open the Session Properties dialog box.

2. Select [ZMODEM] from [Category].

3. Select [Use the following download path] from [Receive folder].

4. Open the Browse For Folder dialog box by clicking […] button of [Download Path] and select a folder where the received files are to be saved.

5. Click [OK].

To View Received File:

1. Open the Session Properties dialog box.

2. Select [ZMODEM] from [Category].

3. Click [Open] in the [Receive folder] field.

See Also

File Transfer


File Transfer Using Xftp

Xshell 4 Help / File Transfer Using Xftp
File Transfer Using Xftp

Xshell is interoperable with Xftp, a NetSarang Computer Inc. file transfer program to enable fast and convenient FTP/SFTP connection with a host currently connected with Xshell.

To Create a Xftp Connection with a Host Currently Connected via Xshell:

1. Connect with the host of a file to be transferred using Xshell.

2. Select [New File Transfer] from the [Window] menu. Or, click the standard [New File Transfer] button.

* Note

If a protocol Xshell uses is SSH, Xftp attempts SFTP connection. If the protocol used by Xshell is TELNET or RLOGIN, Xftp attempts FTP connection.

See Also

File Transfer


Session Logging and Tracing

Xshell 4 Help / Session Logging and Tracing
Session Logging and Tracing

Xshell allows users to log the entire transcript of a session to a file. Trace may be used for debugging.

See Also

Session Logging
Session Tracing


Session Logging

Xshell 4 Help / Session Logging
Session Logging

To Log Character Strings Only:

1. Point to [Log] in the [File] menu.

2. Select [Start]. Save As dialog box is displayed.

3. Enter the file name where log data is to be saved.

4. Clear [Record terminal code as well as normal text].

5. Click [Save].

* Note

Logging continues until a session ends. To stop logging without ending a session, select [Stop] from the [File] – [Log] menu.

To Log Character Strings with Terminal Codes:

1. Point to [Log] in the [File] menu.

2. Select [Start]. Save As dialog box is displayed.

3. Enter the file name where log data is to be saved.

4. Check [Record terminal code as well as normal text].

5. Click [Save].

To Start Logging at Session Connection:

1. Open the Session Properties dialog box.

2. Select [Advanced > Logging] from [Category].

3. Select [Start logging upon connection].

4. Designate the folder or file name where the log is to be saved.

5. Click [OK].

See Also

Session Logging and Tracing


Session Tracing

Xshell 4 Help / Session Tracing
Session Tracing

Using the trace option, trace protocol control data is exchanged with a remote host.

For SSH protocols, user authentication and algorithm exchange details may be displayed on the terminal screen. For TELNET protocols, the exchange of various options can be traced. This is useful when problems occur in connection with a remote host.

To Turn on or Turn off Trace Function:

1. Open the Session Properties dialog box.

2. Select [Advanced > Trace] from the [Category].

3. Select options appropriately.

4. Click [OK].

See Also

Session Logging and Tracing


Printing

Xshell 4 Help / Printing
Printing

Xshell provides the ability to print text in a terminal window via a local printer. Xshell uses fonts and colors used in a terminal window for printing. The printing paper margins can be set in the Page Setup dialog box.

To Set Paper Size and Direction:

1. Select [Page Setup] from the [File] menu.

2. Select an appropriate paper size and direction.

3. Enter margins.

4. Click [OK] to save changes.

To Print:

1. Select [Print] from the [File] menu.

2. Select printer from the [Name] list.

3. Click [OK].


Using Xagent

Xshell 4 Help / Using Xagent
Using Xagent

Xagent is an SSH authentication agent. Xagent holds a user key for public key user authentication and provides it to Xshell when a user key is required by Xshell.

Xagent retains all user key lists and requests a passphrase input when necessary. When a user enters a passphrase, Xagent decodes the user key and saves it in memory. Via Xagent, users may use the same key several times by entering the passphrase once.

Xagent also works as an SSH authentication server for SSH agent forwarding feature. You must use the SSH agent forwarding feature when connecting to a different remote host from the first remote host. Basically your private key is only held in your local PC and an SSH client program on the first server can not connect to a second machine. Using SSH agent forwarding feature, the SSH client program on the first server requests a private key from Xagent to enter into the second server.

* Note

When Xagent is executed, Xagent icon is created in the notification area. Even when the Xagent dialog box is closed, Xagent is not closed and keeps running. To close Xagent or open the Xagent dialog box, use menus on icon in the notification area.

See Also

Connecting to Server Through Xagent
Using the Xagent User Key on a Remote Host


Connecting to Server Through Xagent

Xshell 4 Help / Connecting to Server Through Xagent
Connecting to Server Through Xagent

To Set Xshell to Use Xagent:

1. Open the Session Properties dialog box.

2. Select [Connection > SSH] from [Category].

3. Select [Use Xagent (SSH agent) for handling passphrase].

4. Click [OK].

To Connect with SSH Server Through Xagent:

1. Set Xshell to use Xagent.

2. Execute Xagent if Xagent is not running.

3. Connect to SSH server.

In this case, SSH server must support public key user authentication and the public key section of the user key must be registered on the server.

4. Passphrase dialog box is displayed. Enter passphrase of the selected user key.

* Note

When selecting [Launch Xagent automatically] in [Connection > SSH] setting, the process in No. 2 above may be omitted. Passphrase dialog box is displayed only when the selected key status is Close. You can check user key status in Xagent user keys list.

See Also

Using Xagent


Using the Xagent User Key on a Remote Host

Xshell 4 Help / Using the Xagent User Key on a Remote Host
Using the Xagent User Key on a Remote Host

Using Xagent, the SSH client on a remote host can use a user key used by Xshell, which is a user key held by Xagent. To use an Xagent user key on a remote host, both Xshell and the remote host SSH server must support agent-forwarding.

To Activate Agent-Forwarding on the ssh.com Server:

1. Open the /etc/ssh2/sshd2_config file.

2. Set value for AllowAgentForwarding option as follows:
AllowAgentForwarding      yes

3. Restart SSH server.

* Note

OpenSSH servers automatically enable the agent forwarding feature unless user specifies the no-agent-forwarding option.

To Use Xagent Key on the Remote Host:

1. Set Xshell to use Xagent.

2. Execute Xagent if Xagent is not running.

3. Connect to SSH server and login.

* Note

If the SSH server supports the agent forwarding feature, the environment variable for agent forwarding (SSH_AUTH_SOCK or SSH2_AUTH_SOCK) is set to a proper value.

4. Connect to another server, which supports public key authentication, from the remote server.

5. When Passphrase dialog box is displayed, enter passphrase to the selected user key.

* Note

Passphrase dialog box is displayed only when the selected key status is Close. You can check user key status in Xagent user keys list.

See Also

Using Xagent


Using Scripts

Xshell 4 Help / Using Scripts
Using Scripts

Script is a file that contains a set of commands to be executed at once. Repetitive tasks are collected in a file and commands may be executed without needing to type them in one by one. The file is written as a Visual Basic script.

See Also

Script Starting and Ending
Script API


Script Starting and Ending

Xshell 4 Help / Script Starting and Ending
Script Starting and Ending

To Start a Script File:

1. Point to [Script] in the [Tools] menu and select [Run]. Open dialog box is displayed.

2. Select a script file.

3. Click [OK].

To Stop Script File Execution:

1. Point to [Script] in the [Tools] menu and select [Cancel].

See Also

Using Scripts


Script API

Xshell 4 Help / Script API
Script API

Xshell provides the following script APIs. Use the APIs to automate repetitive tasks.

See Also

Using Scripts
xsh.Session
xsh.Screen
Script Example


xsh.Session

Xshell 4 Help / xsh.Session
xsh.Session

The following functions and variables can be used in Xshell sessions. To use these functions and variables, execute them together with xsh.Session. For example, to use ‘Sleep()’ function, use ‘xsh.Session.Sleep(1000)’.

Functions
Return Value | Function | Parameter | Description
Void | OpenSession(LPCTSTR lpszSession) | lpszSession A character string of an Xshell session path or URL format of Xshell. | Open a new session or URL. To open a session, place /s option in front of a character string. Ex.) To open the A.xsh session, use ‘/s $PATH/A.xsh’.
Void | CloseSession() |  | Close the currently connected session.
Void | Sleep(long timeout) | Timeout Milisecond unit time value. | Make Xshell wait for the designated time.
Void | LogFilePath(LPCTSTR lpszNewFilePath) | lpszNewFilePath File name including path | Designate log file.
void | StartLog() |  | Start logging for a session. Log is designated with a path specified in LogFilePath(). If a log file path is not designated, the default path is used.
void | StopLog() |  | Stop logging.

Variable
Name | Type | Description
Connected | BOOL | Check whether current session is connected.
LocalAddress | BSTR | Retrieve the local address.
Path | BSTR | Retrieve the current session file path.
RemoteAddress | BSTR | Retrieve the remote address.
RemotePort | long | Retrieve the remote port.
Logging | BOOL | Check whether current session is recording log file.

See Also

Script API


xsh.Screen

Xshell 4 Help / xsh.Screen
xsh.Screen

The following functions and variables can be used when handling of the Xshell terminal screen. To use these functions and variables, execute them together with the xsh.Screen. For example, to use ‘Clear()’ function, use ‘xsh.Session.Clear()’.

Functions
Return Value | Function | Parameter | Description
void | Clear() |  | Clear terminal screen.
void | Send(LPCTSTR lpszStrToSend) | lpszStrToSend Character string to send | Send message to terminal.
BSTR | Get(long nBegRow, long nBegCol, long nEndRow, long nEndCol) | nBegRow Terminal row starting position nBegCol Terminal column starting position nEndRow Terminal row ending position nEndCol Terminal column ending position | Read the character string in the specified terminal section and return the value.
void | WaitForString(LPCTSTR lpszString) | lpszString Character string to be displayed on the terminal. | Wait for message.
Long | WaitForStrings(VARIANT FAR* strArray, long nTimeout) | strArray Character string to be displayed on the terminal nTimeout Wait time millisecond value Return Value The number of found strings. | Wait for message until timeout.
void | Synchronous(BOOL bSync) | bSync 1(True) : Synchronize screen. 0(False) : Do not synchronize screen. | Decide screen synchronization. This function could receive the parameter referred value. For example, xsh.Screen.Synchronous = true

Variable
Name | Type | Description
CurrentColumn | long | Return the current column.
CurrentRow | long | Return the current row.
Columns | long | Retrieve the total columns same as terminal width.
Rows | long | Retrieves the total row same as terminal lines

See Also

Script API


Script Example

Xshell 4 Help / Script Example
Script Example

Script file

Sub Main

' *** Connect the session ***

xsh.Session.Open "ssh://192.168.1.17"

' "/s C:\Users\Administor\AppData\Roaming\NetSarang\Xshell\Sessions\example.xsh"

xsh.Screen.Synchronous = true

xsh.Screen.WaitForString "login: "

xsh.Screen.Send "username"

xsh.Screen.Send VbCr

xsh.Session.Sleep 100

xsh.Screen.WaitForString "Password: "

xsh.Screen.Send "password"

xsh.Screen.Send VbCr

xsh.Session.Sleep 100

' *** Wait for Prompt Message ***

xsh.Screen.WaitForString "username@password"

' *** Set File Format ***

Dim app, wb, ws

Set app = CreateObject("Excel.Application")

Set wb   = app.Workbooks.Add

set ws   = wb.Worksheets(1)

xsh.Session.LogFilePath = "c:\example.log"

xsh.Session.StartLog

Dim waitStrs

waitStrs = Array(Chr(10), "username@password") ' make wait message as array

Dim row, screenrow, readline, itmes

row = 1

' *** Send Command ***

xsh.Screen.Send "cat /etc/passwd"

xsh.Screen.Send VbCr

xsh.Session.Sleep 100

Dim result

' *** Read Data and Save it as an EXCEL File ***

Do

While true

        result = xsh.Screen.WaitForStrings(waitStrs, 1000)

        If result = 2 Then

               Exit Do

        End If

        screenrow = xsh.Screen.CurrentRow - 1

        readline  = xsh.Screen.Get(screenrow, 1, screenrow, 40)

        items     = Split(readline, ":", -1)

        ws.Cells(row,1).Value = items(0)

        ws.Cells(row,2).Value = items(2)

        row = row + 1

Wend

Loop

wb.SaveAs("C:\chart.xls")                    ' save file path

wb.Close

app.Quit

Set ws  = nothing

Set wb  = nothing

Set app = nothing

xsh.Screen.Synchronous = false

xsh.Session.StopLog

End Sub

See Also

Script API


References

Xshell 4 Help / References
References

This section provides referential information about using Xshell.

See Also

Standard Buttons
Address Bar
Xshell Local Command
Xshell Command Line Option
SFTP Command
Regular Expression
Pre-defined Shortcut Key


Standard Buttons

Xshell 4 Help / Standard Buttons
Standard Buttons

Xshell provides standard buttons for the frequently used tasks and commands.

The following are descriptions of the standard buttons.

Button | Name | Description
 | New | Create a new session by opening New Session Properties dialog box.
 | Open | Open the Sessions dialog box.
 | Disconnect | Close connection with the current session.
 | Reconnect | Reconnect with the current tab session.
 | Properties | Show current session properties. If the session is not opened, default session properties is displayed.
 | Copy | Copy the selected field to clipboard.
 | Paste | Paste clipboard contents.
 | Find | Open the Find dialog box.
 | Print | Open the Print dialog box.
 | Color Schemes | Select color scheme.
 | Encoding | List encodings available with the output language.
 | Fonts | List available font names and sizes. Fonts for the currently Open the session can be changed. To change the font for each session, select a session font from the Session Properties dialog box.
toolbarnewterminal | New Terminal | Open the a new Xshell window. Click this button while a connection is being made to attempt connection using the corresponding session’s connection information.
toolbarfiletransfer | New File Transfer | Execute Xftp if Xftp™ is installed. Click this button while a connection is being made to start a New File Transfer session with the corresponding session’s connection information. If Xftp is not installed, the Xshell File Transfer session itself is started.
 | Full Screen | Convert to full screen mode. Screen changes to general window mode when Alt+Enter is pressed.
 | Lock | Convert to screen lock mode. User input is not received until password is entered.
 | Key Mapping | Open the Custom Key Mapping dialog box.
 | Script | Start Xshell script file.
 | Start Logging | Start logging.
 | Stop Logging | Stop logging.
cog | Options | Open the Options dialog box.
 | User Key Manager | Open the User Keys dialog box.
 | Host Key Manager | Open the Host Keys dialog box.
 | Xagent | Execute Xagent program.
 | Xactivator | Execute Xactivator program.
 | Help | Open the Xshell help.

See Also

References


Address Bar

Xshell 4 Help / Address Bar
Address Bar

The address bar grammar is as follows:

        [protocol://][user[:password]@]hostname[:port][/]

The available protocols are ssh, sftp, telnet, rlogin, and serial. The default protocol is a protocol

selected in the default session. Default port numbers by protocol are defined as follows:

· ssh:            22

· sftp:           22

· telnet:         23

· rlogin:         513

· ftp:            21

A number of examples are given below.

Example | Description
foobar.com | Connect to foobar.com using the protocol and port number designated in the default session.
ssh://kay@foobar.com/ | Connect to foobar.com using the SSH protocol. User account is ‘kay’ and default port number is used.
ssh://kay@foobar.com:12345/ | Connect to foobar.com port 12345 using the SSH protocol. User account is kay.
telnet://foobar.com/ | Connect to foobar.com via telnet protocol. User account is not designated and connection is made with port 23, the default port.
rlogin://kay@foobar.com/ | Connect to foobar.com using the rlogin protocol. The user account is ‘kay’ and connection is made with port 513, the default port.
sftp://kay@foobar.com/ | Connect to foobar.com using the SFTP protocol. User account is ‘kay’ and the default port number is used.
ftp://foobar.com/test.zip | Connect to foobar.com using the ftp protocol and download test.zip file.

See Also

References


Xshell Local Command

Xshell 4 Help / Xshell Local Command
Xshell Local Command

Xshell provides local commands for advanced users familiar with the terminal environment.

Basically, Xshell prompt is displayed on the terminal screen when a remote host is not connected. When a session is connected, press ‘Ctrl+Alt+]’ to exit to local prompt. To return to the remote host mode, enter ‘exit’ or press ‘Ctrl+D’.

The following commands can be used.

Command | Description
help ? | Display commands list on the terminal window.
new | Open the New Session Properties dialog box.
open the [session] | Connect with the corresponding session when ‘session’ is designated. If a session is not designated, Sessions dialog box is opened.
edit [session] | Open the Session Properties dialog box for the corresponding session if ‘session’ is designated. Open the Session Properties dialog box for the default session if ‘session’ is not designated.
list | Display a list of directories and information about sessions in the current directory.
cd | Change the current task directory.
clear | Clear local shell command prompt screen, address bar history, and command history.
exit quit | Close Xshell session or return to remote host.
ssh [user@]host [port] | Connect using the SSH protocol.
sftp [user@]host [port] | Connect using the SFTP protocol.
telnet [user@]host [port] | Connect using the telnet protocol.
rlogin [user@]host [port] | Connect using the rlogin protocol.
ftp [user@]host [port] | Connect using the ftp protocol.
ipconfig | Execute Windows ipconfig command.
ping host | Execute Windows ping command.
tracert host | Show packet path to host.
netstat | Execute Windows netstat command.
nslookup | Execute Windows nslookup command.

See Also

References


Xshell Command Line Option

Xshell 4 Help / Xshell Command Line Option
Xshell Command Line Option

The following are the command line parameter options recognized by Xshell. These parameters can be used when executing Xshell from Windows console program or other applications.

Option, Parameter

Description

‘session file’

Execute the session. ‘Session file’ can include a path.

-folder ‘session folder’

Execute all folder sessions.

-url [protocol://][user[:password]@]host[:port]

Connect by directly entering URL, rather than using designated session file. Usable protocols are SSH, SFTP, TELNET, RLOGIN and FTP.

When protocol is omitted, use the default protocol designated in the Options dialog box [General] tab.

When user and password are ommited, a window for the authentication is displayed.

When a connection port is not designated, the connection protocol default port of is used.

-open

Open the Sessions dialog box.

-register

Open the a dialog box for product registration.

-about

Open the Xshell Information dialog box where product version and license information is available.

-prop ‘session file’

Open the Session Properties dialog box. ‘Session file’ can include a path.

-create ‘session file’

Create a new session.

-folder ‘session folder’

Execute all sessions in the ‘Session folder.’

-newwin

Open the a new Xshell window.

-newtab ‘tab name’

Create a new tab with ‘Tab Name’.

Example:

Xshell ‘c:\users\zoo\AppData\Roaming\NetSarang\Xshell\Sessions\xdev.xsh’

Execute xdev.xsh session file.

Xshell -url foobar.com

Connect to foobar.com with the default protocol.

Xshell -url ssh://foobar.com

Connect to foobar.com with ssh.

Xshell –url ssh://test:testpasswd@foobar.com

Connect to foobar.com with ssh.

User name and password are ‘test’ and ‘testpasswd’ respectively.

Xshell –url telnet://foobar.com:2300

Connect to foobar.com port 2300 using telnet protocol.

Xshell -newwin -url foobar.com

Connect to foobar.com by executing a new Xshell window.

* Note

If the [Open multiple sessions in a single Xshell window] option is set in the [Advanced] tab of Options dialog box, All parameters with the exception of the ‘-newwin’ are executed in the last Xshell window or a new tab.

The ‘-newwin’ option can be used with other options. A new Xshell window is started with the options.

See Also

References


SFTP Command

Xshell 4 Help / SFTP Command
SFTP Command

Xshell provides commands similar to UNIX/Linux FTP for advanced users who are familiar with terminal environment. Descriptions of each command are as follows. For details, enter ‘help’ command in the SFTP prompt.

Command | Description
get file1 [file2] [file3] … | Download files from the remote host.
put file1 [file2] [file3] … | Upload files to the remote host.
mv path1 path2 rename path1 path2 | Move/rename a file or directory on the remote host.
mkdir directory | Create a designated directory on the remote host.
rmdir directory | Delete a designated directory from the remote host.
rm file | Delete a designated file from the remote host.
pwd | Display the working directory of the remote host.
lpwd | Display the working directory of the local host..
cd directory | Change remote host working directory.
lcd directory | Change local host working directory.
ls [directory] | Display remote host files list.
lls [directory] | Display local host files list.
explore [directory] | View the current (or designated) directory via Windows Explorer.
help [command] | Show instructions for using SFTP commands list or designated commands.
bye exit quit | End SFTP connection.

See Also

References


Regular Expression

Xshell 4 Help / Regular Expression
Regular Expression

This section provides descriptions of the regular expressions used in the Find dialog box.

See Also

References
Pattern Match
The shorthand of character classes
POSIX character classes
Example


Pattern Match

Xshell 4 Help / Pattern Match
Pattern Match
Pattern | Description
. | Any one character except newline character
[abs] | One character of a, b or c
[a-z] | One character from a to z
[^ac] | One character excluding a and c
(x) | x, x can be a regular expression.
x* | x is repeated 0 time or more. x can be a regular expression.
x+ | x is repeated 1 time or more. x can be a regular expression.
x{n,m} | x is repeated n times or more and m times or less. x can be a regular expression.
x{n} | x is repeated n times exactly. X can be a regular expression.
x{n,} | x is repeated n times or more. X can be a regular expression.
x|y | x or y, x and y can be regular expressions.
xy | xy, x and y can be regular expressions.
^ | Start of a line
\A | Start of a line
$ | End of a line
\z | End of a line
\Z | End of a line
\< | Start of a word
\b | Start of a word
\> | End of a word
\B | End of a word

See Also

Regular Expression


The shorthand of character classes

Xshell 4 Help / The shorthand of character classes
The shorthand of character classes
Class | Description
\w | Characters comprising a word, as in [a-zA-Z0-9_]
\W | Characters not consisting a word, as in [^a-zA-Z0-9_]
\s | Spaces
\S | Characters excluding spaces
\d | Numbers, as in [0-9]
\D | Characters excluding numbers, as in [^0-9]

See Also

Regular Expression


POSIX character classes

Xshell 4 Help / POSIX character classes
POSIX character classes
Class | Description
[:alnum:] | Letters and numbers, as in [a-zA-Z0-9]
[:alpha:] | Letters, as in [a-zA-Z]
[:blank:] | Blanks
[:cntrl:] | Controls
[:digit:] | Numbers, as in [0-9]
[:graph:] | Printable characters (blanks excluded)
[:lower:] | Small letters, as in [a-z]
[:print:] | Characters which are not controls
[:punct:] | Punctuations
[:space:] | Spaces
[:upper:] | Capital letters, as in [A-Z]
[:xdigit:] | Characters used to express a hexadecimal number, as in [0-9a-fA-F]

See Also

Regular Expression


Example

Xshell 4 Help / Example
Example
Expression | Description
[0-9]+ | Pattern where a number is repeated more than once
(foo)|(bar) | ‘foo’ or ‘bar’
\.html$ | Character string ending with ‘.html’
^\. | Character string starting with ‘.’

See Also

Regular Expression


Pre-defined Shortcut Key

Xshell 4 Help / Pre-defined Shortcut Key
Pre-defined Shortcut Key

The list below shows descriptions of shortcut keys defined in Xshell.

Shortcut Key | Description
Alt + N | Same as New in the File menu
Alt + O | Same as Open the in the File menu
Alt + C | Same as Disconnect in the File menu
Alt + Enter | Convert to full screen mode
Alt + D | Move keyboard focus to address bar
Alt + L | Change layout
Alt + 1~9 | Move session tab
Alt + Right | Same as Next in the Window menu
Alt + Left | Same as Previous in the Window menu
Ctrl + D | Close local shell in the local prompt
Ctrl + Alt + ] | Exit to local prompt during connection
Ctrl + Alt + T | Same as New Terminal in the Window menu
Ctrl + Alt + F | Same as New File Transfer in the Window menu
Ctrl + Tab | Move to the next session tab in a single Xshell window
Shift + Tab | Move to the recently used session tab in a single Xshell window
Shift + Home | To top
Shift + End | To end
Shift + PgUp | Page up
Shift + PgDn | Page down
Shift + Up Arrow | Upward scroll
Shift + Down Arrow | Downward scroll

* Note

Use the standard [Key Mapping] button to change shortcut keys. In the Custom Key Mapping dialog box, change shortcut key combinations and allocate key operations such as menu, send character string, execute script, and execute program.

See Also

References