Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 042010

Simple port forwarding using SSH


Assume you are working at office, you want to browse the securely, you can do so by using a computer at home (e.g. HOME_IP)to build a secure tunnel using ssh.

# sudo ssh -L HOME_IP

Then in your browser, type http://localhost and you can view the securely.

Aug 302010

Fix the warning of: Remote Host Identification Has Changed error and solution


You might experience this error, especially when you are connecting to a remote Linux machine which has just got re-installed.

To solve this, enter the command:

# ssh-keygen -R

Where is the IP you are connecting.

Jun 152010

Specify a port with the scp command


If you want to use scp to copy file to remote machine, but that ssh server is listening at port other than 22, you can use the following command syntax.

# scp -P 6000 test.txt john@remoteserver:/home/john/

Please notes it is -P, not -p.