Solved

How to transfer files with SSH?

Posted on 2004-09-18
5
246 Views
Last Modified: 2010-08-05
Right now I am using SSH File Transfer Client gui to do all my file transfers.  Is there a way to do this from the shell?  Say I'm logged into an SSH server and want to copy a file from it. What would the command be?

What about copying a command from the local pc to the ssh server?
Thanks
0
Comment
Question by:dissolved
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 17

Accepted Solution

by:
owensleftfoot earned 170 total points
ID: 12093510
To transfer a file you would use scp - you dont have to be logged in to the ssh server to do this, just use scp with your username & password.Have a look at man scp. To run a command on the remote ssh server you would use ssh.
ssh [-l login_name] hostname | user@hostname [command]
0
 
LVL 6

Assisted Solution

by:blkline
blkline earned 200 total points
ID: 12093511
You may use "scp" to do your file copy.  Also, you can do:

cat file | ssh user@remote.host "cat - > file"

If you want to use only ssh.

Barry
0
 

Author Comment

by:dissolved
ID: 12093623
Ok, I'm secure shelled into my SSH server on my lan.  I am on a windows box. How would I do this?

root#  ls
file_to_transfer.txt

root#

Thanks guys
0
 
LVL 2

Assisted Solution

by:zuralin
zuralin earned 130 total points
ID: 12093762
To do it from a Windows box while in cmd.exe or command.com install psftp (PuTTY SFTP) from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html and save it to c:\Windows\System (i think).  Then while at the prompt type "psftp -h" to get a list of options.  I think this is what you are looking for anyways.
0
 

Author Comment

by:dissolved
ID: 12094219
thanks guys
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question