Home page logo
/
Zenmap screenshot
Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News
Example Nmap output

File ssh-run

Script types: portrule
Categories: intrusive
Download: https://svn.nmap.org/nmap/scripts/ssh-run.nse

User Summary

Runs remote command on ssh server and returns command output.

Script Arguments

ssh-run.username

Username to authenticate as

ssh-run.cmd

Command to run on remote server

ssh-run.password

Password to use if using password authentication

ssh-run.privatekey

Privatekeyfile to use if using publickey authentication

ssh-run.passphrase

Passphrase for privatekey if using publickey authentication

Example Usage

nmap -p 22 -v -d --script=ssh-run --datadir=./ \
--script-args="ssh-run.cmd=ls -l /, ssh-run.username=myusername, ssh-run.password=mypassword" <target>

Script Output

22/tcp open  ssh     syn-ack 0
| run-remote:
|   output:
|     total 124
| drwxr-xr-x   2 root       root        4096 Jun 23 09:34 bin
| drwxr-xr-x   3 root       root        4096 Jun 19 12:42 boot
| drwxr-xr-x   2 root       root        4096 Feb  6  2013 cdrom
| drwxr-xr-x  16 root       root        4340 Jul 17 13:37 dev
| drwxr-xr-x 162 root       root       12288 Jul 20 12:10 etc
| drwxr-xr-x  15 root       root        4096 Jun 23 15:20 home
| ...
|_drwxr-xr-x  14 root       root        4096 Jun  6 14:58 var

Requires


Author:

  • Devin Bjelland

License: Same as Nmap--See http://nmap.org/book/man-legal.html

Nmap Site Navigation

Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]