Solved

How to transfer files with SSH?

Posted on 2004-09-18
5
244 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
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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.
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.

856 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