Fun With Openssh

Networking is something I’ve never found quite as interesting as some of my choice topics in Computer Science. However, I have been playing a lot with various Linux networking tools. Netcat is a great tool, and perhaps I will write about how awesome it is in future. Today, I have had quite a bit of fun with Openssh for which I have found many practical uses.

The first thing I set out to do was transfer files over my network. This was really easy to do with the command:

$scp

which is Openssh’s secure copy tool.

So, first let’s make sure that openssh is installed. On a debian system that can be achieved with:

$apt-get update

$apt-get install openssh

Now, make sure to find your ip address.  You can find this information with:

$/sbin/ifconfig

Now, we should have everything we need to transfer a file.  So, the command to do this to transfer a file from the local system to the remote is:

$scp foobar.localfile.txt user@127.0.0.1:/target/directory/on/remote/system

Where “127.0.0.1” is the remote systems ip address.

So, now lets tackle transferring a file from the remote system to the local system.

$scp user@127.0.0.1::/target/directory/on/remote/foobar.remotefile.txt /local/directory/

Stay tuned for more Openssh fun coming soon.

Advertisements
  1. No trackbacks yet.

You must be logged in to post a comment.
%d bloggers like this: