element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • 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
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Raspberry Pi - enabling SSH by default to make life easier.
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: GreenYamo
  • Date Created: 2 Jun 2012 1:01 PM Date Created
  • Views 171 views
  • Likes 1 like
  • Comments 0 comments
  • ssh
  • raspberrypi
  • guide
Related
Recommended

Raspberry Pi - enabling SSH by default to make life easier.

GreenYamo
GreenYamo
2 Jun 2012

Well, slightly longer time than I hoped for a second post, but here it is at last.

 

If you are a mainly windows user, you may not have come across telnet or ssh (more here) however in the Linux and Unix world they are very useful, and will make managing your Pi a lot easier.

 

In the original Debian build (the one I will be concentrating on) SSH was enabled by default but in the later build disabled. This was on security concerns, but unless you are directly exposing your pi to a public IP address this doesn't really matter - in simpler terms, if you connect to the Internet via a router then you don't really have a lot to worry about.

 

To enable SSH by default (so it works all the time) see the following link: http://elinux.org/R-Pi_Troubleshooting#Cannot_ssh_in_to_Pi

 

So from the command line on the Pi (after logging in, but before entering startx to go to the windows like environment) enter:

 

sudo mv /boot/boot_enable_ssh.rc /boot/boot.rc

 

Re-boot from the command line:

 

sudo shutdown -r now (Sudo - act as super user, shutdown as it sounds, -r = reboot and when=now)

 

You are now the proud owner of a Pi with SSH enabled, but Why I hear you ask ?

 

Well, when you are entering other instructions to do other exciting stuff on your Pi, to make life a little easier, you can SSH into your Pi using something called Putty, an SSH and telnet client for windows and type those instructions from the putty client rather than on the pi, which may not even have a keyboard attached.

 

You will need the ip address of the pi, which you can find from the command line by typing ifconfig. Look for the block of text with Eth0 next to it (if on Ethernet) or wlan0 (if on wireless). look for the words 'inet addr' and next to this will be your pi's ip address, in my case it is 192.168.1.115 (this can change, so don't expect to be able to use the same IP every time you connect) and should start 192.168.x.x or 10.0.x.x (where x is a number from 0-255).

 

Next, fire up Putty,ensure connection type in putty is set to SSH, type in the Pi ip address (as below) and hit enter. You may get some messages about certificates, just answer yes or confirm. You will then get a black dos type window asking you to 'log in as'. Enter pi for the user and raspberry for the password (eg the default ones if you haven't changed them) and then you will be using your pi from the remote terminal. Now when you need to type long and complicated commands to set something up, you don't need to type them by hand, just copy and paste from the source you are looking at (copy a command on your windows PC, go to the putty window and right click, the command will paste). I find this a lot easier than doing the same thing directly on the pi.

 

If anyone is interested, you can now also use an FTP client to get files onto your pi (eg Quake Pak files) rather than having to download directly. I'll cover this in another post if anyone wants.

 

image

  • Sign in to reply
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 © 2023 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube