Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to list open ports of a server, which is not accessible from my computer (running on Windows) , but is accessible from a computer to which i can connect via SSH?

share|improve this question
    
Can you install nmap on the computer to which you can connect via SSH? –  Bruno Jan 11 '12 at 13:58
    
no..but i can run this program System => Administration => Network Tools=>Port Scan when i have direct access to that computer. Is it possible to run that tool via command line and via SSH? –  regulator Jan 11 '12 at 14:35
1  
Normally, SSH only tunnels a specific port. More recent versions of SSH provide full tunneling capabilities, but the server has to be set up to allow it. –  Mei Jan 11 '12 at 14:43
add comment

2 Answers

This will only work if the computer you can connect to has NMAP available to it. NMAP is generating all kinds of traffic (TCP and UDP), and these would have to be tunneled over SSH. NMAP sends out lots of "bad" traffic, and I wouldn't expect SSH to tunnel it all.

The best thing to do is install NMAP on the remote computer and run it there.

However, only do this if you have legitimate permission to do this. If the remote site (to be probed) is someone else's and you don't have permission, it would be a violation of corporate policy and of local and federal laws to improperly access the site using NMAP.

share|improve this answer
add comment

Accessing a node is one thing. Accessing a list of open ports on a node is another. However since you mention nmap you can do

ssh -t host command

there's also this option or install nmap on the other computer

share|improve this answer
add comment

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.