5,838
edits
m (→sudo) |
m (→How to set up SSH?: Improved) |
||
====How to set up SSH?====
If you want to run your Pi headless (without monitor, keyboard, mouse), then you must ensure SSH (which is off by default) is switched on as your Pi boots up. The only way to achieve that is by adding a file '''SSH''' to the boot partition before the micro=SD card is put into the Pi. If you don't do this you cannot get headless operation, and you will need to move a monitor or TV, mouse, and keyboard, across to the Pi, because you can't even close down the Pi tidily!
The file, you add to the boot partition, must be named "SSH" with those three letters in capitals, but with no file extension. You can create the file with whatever text editor you have available.
Type into the file <tt>touch ssh</tt>, but nothing else, no empty lines, no end of line characters.
When the card is inserted into your Pi, on boot this file will be removed and the SSH option will be enabled.
''Of course'' if you have a monitor or TY, and a mouse and a keyboard, then you don't need to use SSH, but you can give yourself the best of both worlds by switching SSH on, the easiest way is using the '''Raspi-config''' tool, either from the main menu (raspberry Pi icon inside a square) or in terminal mode with '''sudo raspi-config'''.
====How to use SSH?====
|
edits