Secure Shell

From KevinWiki

(Difference between revisions)
Jump to: navigation, search
(New page: Category:Network == Secure Shell (SSH) == Secure Shell (SSH) is a network protocol which transfer data using secure channel between two networks. == Tunnel...)
m
Line 1: Line 1:
[[Category:Network]]
[[Category:Network]]
== Secure Shell (SSH) ==
== Secure Shell (SSH) ==
-
[[wikipedia: Secure Shell|Secure Shell (SSH)]] is a network protocol which transfer data using secure channel between two networks.
+
[[wikipedia: Secure Shell|Secure Shell (SSH)]] is a network protocol which transfers data using a secure channel between two networks.
== Tunneling ==
== Tunneling ==
-
-Creating tunnel through ssh
+
-Creating a tunnel through ssh
<pre>
<pre>
$ ssh id@<remote machine address> -L <port number on local machine>:<local machine address>:<port on remote machine>
$ ssh id@<remote machine address> -L <port number on local machine>:<local machine address>:<port on remote machine>
Line 14: Line 14:
</pre>
</pre>
-
-To test web application, running on tomcat server on a remote machine.
+
-To test a Java web application, running on tomcat server on a remote machine.
<pre>
<pre>
$ ssh id@remote.address -L 8080:localhost:8080
$ ssh id@remote.address -L 8080:localhost:8080
Line 20: Line 20:
== SCP ==
== SCP ==
-
-Copy file in the 'dir' directory on the remote machine to the directory 'home' on the local machine.
+
-Copy a file in the 'dir' directory on the remote machine to the directory 'home' on the local machine.
<pre>
<pre>
$ scp -pr username@remote_address:dir/file /home/
$ scp -pr username@remote_address:dir/file /home/

Revision as of 15:12, 29 September 2008

Secure Shell (SSH)

Secure Shell (SSH) is a network protocol which transfers data using a secure channel between two networks.

Tunneling

-Creating a tunnel through ssh

$ ssh id@<remote machine address> -L <port number on local machine>:<local machine address>:<port on remote machine>

-To forward traffic from port 4881 on the local machine to port 8080 on the remote machine the IP of which is 192.168.0.10.

$ ssh id@192.168.0.10 -L 4881:localhost:8080

-To test a Java web application, running on tomcat server on a remote machine.

$ ssh id@remote.address -L 8080:localhost:8080

SCP

-Copy a file in the 'dir' directory on the remote machine to the directory 'home' on the local machine.

$ scp -pr username@remote_address:dir/file /home/
-p      Preserves modification times, access times, and modes from the original file.
-r      Recursively copy entire directories.


-Copy a file on the local machine to remote machine

$ scp -p localfile remote.address:dir
Personal tools