Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

XShell is a very powerful tools to ssh remote computers such as Unix/Linux. And it has built some internal commands for you to run within your Windows.

Xshell:\> help
Internal Commands:
new:      Creates a new session.
open:     Opens a session or the session dialog box.
edit:     Opens the Session Property dialog box for a session.
list:     Lists information of all available sessions.
          'ls' and 'dir' do the same.
cd:       Changes the current working directory.
clear:    Clears the screen/address/command history.
help:     Displays this help. '?' does the same.
quit:     Quits Local Shell. 'exit' does the same.
ssh:      Connects to a host using the SSH protocol.
telnet:   Connects to a host using the TELNET protocol.
rlogin:   Connects to a host using the RLOGIN protocol.
sftp:     Connects to a host to transfer files securely.
ftp:      Connects to a host to transfer files.

External Commands:
ipconfig: Configures TCP/IP network interfaces.
ping:     Sends ICMP ECHO_REQUEST packets to network hosts.
tracert:  Prints the route packets take to network host.
netstat:  Displays current protocol statistics and current
          TCP/IP network connections.
nslookup: Resolves a hostname to IP address.

For more information, type 'help command' for each command.
ex) help telnet

But these commands are limited, so how to add commands of windows to local shell of XShell 4

share|improve this question

migrated from unix.stackexchange.com Dec 19 '12 at 16:45

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems..

    
Off topic, XShell is a commercial application for MS Windows –  Martin Dec 19 '12 at 16:11

2 Answers 2

External Commands:

See that part of the help? It's allowing you to run arbitrary Windows commands locally. Such as ipconfig.

Try cmd or shutdown or notepad. If it's in your PATH environment variable, you should be able to run arbitrary Windows commands from this shell. Of course, I don't own a copy of XShell, so I can't actually test this theory, but you should try it.

XShell may not be flexible enough to execute arbitrary Batch script (if it doesn't support the same syntax), but you could run cmd.exe or a .bat file to get access to cmd scripting.

share|improve this answer

Unfortunately

NetSarang has not added this ability to xShell (as of version 4).

The only option for now, is to make a suggestion on their forum. Like this post: http://www.netsarang.com/forum/xshell/1901/sol

However

that does not mean we are without options until they decide to add this feature :)

You just have to be comfortable with using a Hex Editor. (Highly Recommend: HxD)

Note this will require that you replace one of the existing external commands.

  1. Open the xShell install directory (usually: C:\Program Files (x86)\NetSarang\xShell 4)
  2. Make a copy of xShell.exe and name it xShell.bak.exe (This will be a backup.)
  3. Open xShell.exe in HxD
  4. Do a Search/Find (Ctrl + F) for one of the following commands:
    • ipconfig
    • ping
    • tracert
    • nslookup
  5. Now replace that command with cmd (For my example, I replaced ipconfig with cmd)
    • This allows me to use the full cmd interface within xShell.
    • Disclaimer: Know that there will most likely be some issues. This is not supported behavior!
  6. Before: enter image description here

  7. After: enter image description here

  8. Save the changes to xShell.exe and you are done.

  9. Enjoy :D

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.