Showing posts with label SSH. Show all posts
Showing posts with label SSH. Show all posts

Monday, June 30, 2014

Downloading files remotely using PuTTY

Recently at work I found myself in a situation where I needed a file from my home server and I had just replaced my work laptop and still didn't have a linux installation available. After doing a bit of searching I found out that I can use PuTTY under windows to directly download this file through an SSH tunnel. Here is how you can do that.

Open the windows command prompt by typing "run" in the search box and pressing enter.

Once you have the terminal open find the path to the folder where putty is located, on my windows 7 install that equates to C:/Program Files x86\Putty

from there just make sure you have the file pspc.exe available (if you don't know, the command "dir" shows files , but I'm assuming if you know how to use PuTTY you also know how to navigate windows using the terminal.

Run pscp by typing the command

pscp.exe 

now enter the command

pscp.exe username@x.x.x.x:/file_path/filename c:\directory\filename

where username pertains to your credentials to log into the server via SSH remotely. x.x.x.x is obviously the ip address of the server you are trying to download the file from. The first path pertains to the path of the file you want to retrieve (yes you have to know this in advance, if you don't just SSH normally and figure it out first). Then the last path is the path of where you want you new file to be downloaded into.

I hope this is helpful for when you can't just use sshfs under linux. If you don't know what SSHFS is look it up, it's basically an SSH method of mounting a samba directory remotely. I may post more on that at some point.

Tuesday, June 11, 2013

Using an SSH Client on Ubuntu 13.04

Since now I have an Ubuntu Server setup at home, I feel the need to use a client from my Ubuntu 13.04 VM. In order to do that I followed this great concise guide I found from ubuntulinuxhelp.com (from garymacritchie)

---

The SSH Client

The SSH Client is the piece of software that you have on the computer you are sitting in front of and typing on. It sends messages to the SSH server which is on the remote computer (such as the webserver). We’ll assume that there is already a valid SSH server up and running that you are trying to connect to.

In Ubuntu, there is a SSH client installed as standard and it is called Open SSH.

To use it, you simply open a terminal and proceed any command with “ssh”.

For example, if you would like to log in to your remote server, just use the command…

ssh username@mysite.myserver.org

However, as this is a blog that likes to keep things simple (and annoy a lot of the die-hard Linux geeks), I’m going to suggest a different tool… PuTTY.

PuTTY is a client program for SSH (among other things) and gives a neat little interface for making SSH connections. It is also in my opinion one of the best pieces of software ever written. It has been around for ever and can also be used on Windows without installation (just runs as a .exe). Learn this little guy and you will never look for another SSH client.

Install PuTTY by typing the following into a terminal…

sudo apt-get install putty

You will then find the PuTTY program among your other internet applications.

(When you start it up, you will be able to enter the ip address or name of the remote computer you wish to contact and click connect. You will then be asked for password etc. If you are going to be using SSH regular, you can save that connection as a profile which makes things easier).