element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Forum How to copy file from PC to BeagleBone with SSH
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 9 replies
  • Subscribers 103 subscribers
  • Views 6506 views
  • Users 0 members are here
Related

How to copy file from PC to BeagleBone with SSH

ninjatrent
ninjatrent over 7 years ago

Hello everyone,

 

My question is, how can I copy a file from a Windows PC to a BeagleBone?

 

I have tried PSFTP for Windows but I get permission denied when I try to copy the file over.

I am logged in as "debian" with default password "temppwd".

Anyone know a solution? I tried logging in as root but I don't know the default password.

 

Thanks for your time and help.

 

Trent

  • Sign in to reply
  • Cancel

Top Replies

  • mp2100
    mp2100 over 7 years ago +6
    And I feel compelled to admit I usually do "sneakernet", for one-time copies. Copy files to USB flash drive, walk it over to beaglebone, copy files.
  • gecoz
    gecoz over 7 years ago in reply to ninjatrent +3
    Hi Trent, Yes, it does. Make sure that the system path includes the path to the pscp.exe file (or you can just cd into the directory containing the executable before executing the command) From your earlier…
  • shabaz
    shabaz over 7 years ago +3
    Hi Trent, Hopefully you've solved it with all the excellent solutions above, otherwise for some examples of the syntax for the method Fabio mentions, see here in the "Transferring Files" section: Accessing…
  • mp2100
    mp2100 over 7 years ago

    Ninja,

    If you're doing this from Windows, I've found the easiest is to use WinSCP, that stands for Secure CoPy.  I've used WinSCP to send files to an FTP server running on Linux.

    Rather than remembering all the steps, I suggest reading through this description.  It covers it in good detail, including installing what you need:

     

    https://marcclifton.wordpress.com/2015/12/04/setting-up-beaglebone-black-with-debian-and-ssh-with-windows/

     

    He also uses PuTTY on Windows to establish a ssh connection.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • mp2100
    mp2100 over 7 years ago

    And I feel compelled to admit I usually do "sneakernet", for one-time copies.  Copy files to USB flash drive, walk it over to beaglebone, copy files. image

    • Cancel
    • Vote Up +6 Vote Down
    • Sign in to reply
    • Cancel
  • gecoz
    gecoz over 7 years ago

    Hi Trent,

     

    To copy a file via SSH I usually use scp (PSCP on WIndows). The command syntax is straighforward:

     

    pscp <path_to_the_source_file_to_copy>  <user>@<destination_host>:<absolute_path_to_the_destination>

     

    In your case,  the user is debian, and the absolute path to the destination should point to a directory that the user debian has write permission  for (somewhere inside the user home directory /home/debian is safe).

     

    I hope this helps,

     

    Fabio

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • ninjatrent
    ninjatrent over 7 years ago in reply to mp2100

    Hi Allen,

     

    I have connected to the BeagleBone Blue by ssh with PuTTY using "debian" and "temppwd". I've also logged in with PSFTP (ftp program similar to WinSCP) using the default user and pass. I received a permission denied message when trying to move files from pc to the  /usr/bin/ directory and the /boot/dtbs/. I can try WinSCP but it seems like there would be similar results.

     

    Trent

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • ninjatrent
    ninjatrent over 7 years ago in reply to gecoz

    Hi Fabio,

     

    Does this need to be typed in Windows Command Prompt?

    pscp <path_to_the_source_file_to_copy>  <user>@<destination_host>:<absolute_path_to_the_destination>

     

    Trent

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • gecoz
    gecoz over 7 years ago in reply to ninjatrent

    Hi Trent,

     

    Yes, it does. Make sure that the system path includes the path to the pscp.exe file (or you can just cd into the directory containing the executable before executing the command)

     

    From your earlier reply to Allen, I suspect it is a file permission problem. To copy or move anything in the /usr/bin and /boot/dtbs directories you need root privileges. Perhaps you can try copying the files in the debian user home directory first, then log into the BeagleBone and copy the files to their final destination using sudo.

     

    Fabio

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 7 years ago

    Hi Trent,

     

    Hopefully you've solved it with all the excellent solutions above, otherwise for some examples of the syntax for the method Fabio mentions, see here in the "Transferring Files" section:

    Accessing and Controlling the Pi

    (It says Pi, but the process is identical for any Linux machine).

    Also the USB "sneakernet" : ) method that Allen mentions is sometimes the easiest.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • ninjatrent
    ninjatrent over 7 years ago in reply to shabaz

    Hi Shabaz,

     

    These suggestions did work. The file was transferred to the Beagle's /home/debian folder with PSFTP. WinSCP worked as well. I will have to start over. I've made quite a few previous mistakes. Fresh image on the microSD, I will get it right his time...maybe image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ninjatrent
    ninjatrent over 7 years ago in reply to gecoz

    Hi Fabio,

     

    This is correct. Thank you for the help. The files required sudo sed permission to be moved. I've made so many mistakes on this image.

    I am going to start over with a fresh image on the microSD.

     

    Trent

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube