?
Solved

How to transfer files with SSH?

Posted on 2004-09-18
5
Medium Priority
?
251 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 680 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 800 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 520 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month14 days, 18 hours left to enroll

771 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