Solved

How do I SFTP from a SSH session

Posted on 2011-03-12
7
492 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
[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
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
Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

 
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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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 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.:

691 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