tackyattack
Posts: 14
Joined: Mon Feb 25, 2013 10:18 pm

File transfer over SSH using terminal

Mon Feb 25, 2013 10:42 pm

I have my raspberry pi SSH'd to my mac via terminal. I would like to know if there's a way to transfer a python file (.py) to a raspberry pi directory using this SSH connection.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: File transfer over SSH using terminal

Tue Feb 26, 2013 1:41 am

from your mac

Code: Select all

scp /path/to/py/file pi@raspberrypi:~
Replace raspberrypi with the ip address of the Pi if using the hostname doesn't work.

or from the pi

Code: Select all

scp macuser@macipaddress:/path/to/py/file ~
replace macuser and macipaddress with your mac user and mac's ip address.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

User avatar
tonyhughes
Posts: 951
Joined: Wed Dec 26, 2012 3:46 am

Re: File transfer over SSH using terminal

Tue Feb 26, 2013 1:47 am

As per SirLagz - scp is great, quick, and easy.

Setup SSH keys and you won't need to supply a password.

Return to “Beginners”