Friday, February 21, 2014

Port Scan using "nc"

Using the following command you can check if the ports are open or not.

The below command scans for ports in the range 1 to 1023:

nc -z 1-1023

Friday, February 7, 2014

Editing Remote files using Sublime Text Editor

Use Case:

Sublime Text (2/3) - Installed Locally on your Linux/MacOSX box

Edit files on remote hosts via SSH protocol - using Sublime Text (any file what you wish to edit on the remote machine, should automatically open on the sublime text editor locally)


(1)Using Package Control, install "rsub" (if you don't have PACKAGE CONTROL, install that first for Sublime Text)

(2) On the local machine, where sublime text is installed, insert the line below into the file ~/.ssh/config

Host <> RemoteForward 52698 localhost:52698

(3) SSH to <user>@<> and type the following command:

sudo wget -O /usr/local/bin/rsub

(4) Assign the right permissions to the file

sudo chmod 755 /usr/local/bin/rsub

(5) From local machine, SSH to <> via Remote Forwarding

ssh -R 52698:localhost:52698 <user>@<>

(6)Start Editing the files !

rsub ~/

The above command (#6), when executed on remote host, will automatically open the file locally on your machine where Sublime Text is Running !