Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
nmap -sT -p 22 192.168.1.*
Also if the host that is running ssh has a host name, you can just use the host name in the LAN. i.e.ssh user@hostname
Thanks zeroconf. :-)for i in 192.168.1.{61..71}; if ping -c 1 $i &> /dev/null; then echo $i;fi;done
If you don't have nmap, you can try if the ssh port is open with nc:nc -w1 -z ciptux.physik.uni-bonn.de 22
@Abiden: To replicate what AlecSchueler did, your command should be:nmap -sT -p 22 192.168.1.61-71
for i in 192.168.1.{61..71}; do if ping -c 1 $i &> /dev/null; then echo $i;fi;done
Orfor i in 192.168.1.{61..71}; do ping -c 1 "$i" &> /dev/null && then echo "$i" ;done
for i in 192.168.1.{61..71}; do ping -c 1 "$i" &> /dev/null && echo "$i" ;done
for i in $(seq 61 71); do nc -vv -z -w1 192.168.1.${i} 22; done
Also: @0x89 For netcat to produce any output, you must specify at least one '-v'.