How to copy a file from Yun

Hello,

I would like to copy a file that is in the root folder of my Yun, to my Macbook. They are connected through ethernet cable and I am logged into the Yun through ssh.

The Yun's IP is 192.168.2.16 while the Mac's is 192.168.2.1.

How can I copy a file from the Yun? I know how to do the opposite with scp command but I don't know how to use it in this case

Found the solution:

scp root@192.168.2.16:/path/to/file /where/you/want/it/to/go

Do you type this in on the Yun side or in the terminal side on the mac?

on my mac's terminal

Thanks. Could have taken that guess since it is your yun's ip-address ::slight_smile:

Would this also be possible with Putty in windows? I try to get the path right but it keeps saying no such file or directory.

arjan_hes:
Would this also be possible with Putty in windows? I try to get the path right but it keeps saying no such file or directory.

A putty window is not the same thing as a Mac terminal window. Putty is a terminal emulator that can communicate with remote systems over serial ports or network ports. The Mac terminal is a command line window to the local system - the closest equivalent on Windows is a "cmd" window.

When mridolfi is typing the SCP command, he's telling the Mac to run that command and copy from the Yun to the local system. In that case, /where/you/want/it/to/go is the Mac's file name. Windows uses a very different syntax, something like c:\where\you\want\it

You might be able to do the same thing under Windows using a cmd window, after you find and install an SCP command line client on your computer. But there's an easier way: get WinSCP and then use that to connect to your Yun. It gives you a window to the Yun's file system, and lets you simply drag files in either direction.

I was sort of half half looking for this program. Last week I thought it might be a good idea to copy some file from my Yun as my webpage is nearing completion and it was a lot of effort. So I was thinking about 'a' program that looks like... well, winscp as it turns out. Thanks!

mridolfi:
Hello,

I would like to copy a file that is in the root folder of my Yun, to my Macbook. They are connected through ethernet cable and I am logged into the Yun through ssh.

The Yun's IP is 192.168.2.16 while the Mac's is 192.168.2.1.

How can I copy a file from the Yun? I know how to do the opposite with scp command but I don't know how to use it in this case

You have:

Yun is ssh server.
Mac is ssh client.

one mouse click away:

Yun is ssh client.
Mac is ssh server.

Winscp for windows, folder manager that conects to yun and shows the folders in a graphic interface, very good.

Install an SFTP server on the Yun, using these commands:

opkg update
opkg install openssh-sftp-server

Then use an SFTP client like Cyberduck or WinSCP to traverse the file structure of your Yun, drag and drop files into it, etc.

Traversing a file structure using text commands hasn't been necessary since the mid 80's.

snottywong:
Install an SFTP server on the Yun, using these commands:

opkg update

opkg install openssh-sftp-server




Then use an SFTP client like Cyberduck or WinSCP to traverse the file structure of your Yun, drag and drop files into it, etc.

Traversing a file structure using text commands hasn't been necessary since the mid 80's.

Its not necesary to install that on yun to use winscp. I used it out if the box.

mart256:
Its not necesary to install that on yun to use winscp. I used it out if the box.

Same here. The dropbear server is installed by default.