Xshell Command Line Options

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

Option, Parameter

Description

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 a URL, rather than using a designated session file. Usable protocols are SSH, SFTP, TELNET, RLOGIN and FTP.
When the protocol is omitted, it will use the default protocol designated in the Options dialog box [General] tab.
When user and password are omited, a prompt for authentication will be displayed.
When a connection port is not designated, the connection protocol’s 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 displayed.

-prop 'session file'

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

-create 'session file'

Create a new session.

-newwin

Open a new Xshell window.

-newtab 'tab name'

Create a new tab with 'Tab Name'.

-multi 'session file|session file|...'

Run multiple session files simultaneously.

-i 'private key name'

Specifies the private key to use during public key authentication.

-defprop 'session file'

When using the -url parameter, etc., you can specify a session file to use instead of the default session. Properties not specified in the URL will be inherited from the specified session file.

-resetlicense

Reset a free user's license.

-help, /?

Opens a dialog box which displays the options available from the command line.

 

 

Examples

  • Execute xdev.xsh session file.
    Xshell 'c:\users\user\Documents\ NetSarang Computer\8\Xshell\Sessions\xdev.xsh'

  • Connect to netsarang.com with the default protocol.
    Xshell -url netsarang.com

  • Connect to netsarang.com with ssh.
    Xshell -url ssh://netsarang.com

  • Connect to netsarang.com with ssh. User name and password are 'username' and 'demopassword' respectively.
    Xshell –url ssh://username:demopassword@netsarang.com

  • Connect to netsarang.com port 2300 using telnet protocol.
    Xshell –url telnet://netsarang.com:2300

  • Connect to netsarang.com by executing a new Xshell window.
    Xshell -newwin -url netsarang.com

  • Change the tab name that accesses netsarang.com.
    Xshell -newtab 'netsarang status' netsarang.com

  • Run session1.xsh and session2.xsh files simultaneously.
    Xshell -multi 'c:\...\session1.xsh|c:\...\session2.xsh'

  • Connect to netsarang.com using the URL, but use altDef.xsh rather than the default session for session properties.
    Xshell -url ssh://test:testpasswd@netsarang.com -defprop altDef.xsh


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.