Solved

How do I SFTP from a SSH session

Posted on 2011-03-12
7
425 Views
Last Modified: 2012-05-11
Hello,

I'm connect to a host via ssh then I sftp to the same host and try and execute a PUT command trying to copy a file from my local file system to the host I ssh'd and sft'd to.  I get a file not found.  I dragged the file from my local file system so I know the path is correct.  How would I get a file from my local file system up to that host?
0
Comment
Question by:cgray1223
7 Comments
 

Author Comment

by:cgray1223
ID: 35115036
I'm on a mac if that matters...
0
 
LVL 5

Accepted Solution

by:
valheru_m earned 500 total points
ID: 35115068
scp /path/to/local/file username@remotesystem:/path/to/put/remote/file/
0
 

Author Comment

by:cgray1223
ID: 35115500
@Valheru m....thanks for the reply.  Do I run the scp command after I ssh?  I can't just do a scp when I'm not ssh'd to this machine for some reason.  
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 5

Expert Comment

by:valheru_m
ID: 35115510
In your scenario you'd run scp from your local box, not inside an ssh session. Scp uses the same protocol as an ssh session, but instead of getting you a remote shell, the purpose
Is to copy files. Scp has been a native command in the terminal of all macs since I've been using them, which is since the 10.4 days.
0
 
LVL 5

Expert Comment

by:valheru_m
ID: 35115515
http://www.linuxtutorialblog.com/post/ssh-and-scp-howto-tips-tricks

Scroll down a bit til you get to the section on scp.
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 35115548
ssh / sftp / scp are separate commands, did you try sftp ?
0
 
LVL 23

Expert Comment

by:savone
ID: 35115683
You can use cyberduck, or filezilla for mac.

My opinion Filezilla is the best.

CYBERDUCK:
http://www.apple.com/downloads/macosx/internet_utilities/cyberduck.html

FILEZILLA:
http://filezilla-project.org/download.php
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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 …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now