Solved

How do I SFTP from a SSH session

Posted on 2011-03-12
7
438 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
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!

 
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)

Question has a verified solution.

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

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,…
Secure Shell (SSH) is a network protocol for secure data communication, mainly used to administer remote Unix / Linux servers via command line. But it also allows the user to open a secure tunnel between a client and a server where he can send any k…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

863 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

20 Experts available now in Live!

Get 1:1 Help Now