MX on Linux: Difference between revisions

434 bytes added ,  19:34, 2 September 2020
m
Line 194: Line 194:
====How to set up SSH?====
====How to set up SSH?====


By default, this optional way for another device to see your PI and to pass commands to your Pi and see the resulting output.
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!
*If you have a keyboard, mouse, and monitor/TV;  you can turn SSH on in the configuration application on your Pi,
* but you can also add a file to your micro-SD card that will ensure SSH is turned on, and stays on, as your Pi boots up and the instructions to do that are in next paragraph.


The file 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. On a Windows PC, if you right click (while viewing the boot directory on the card) there is an option called '''New'''  and if you select ''a text file'' it will create an empty file with the extension '''.txt'''. (In windows there is an option to hide extensions which is on by default, so you may need to deselect this option ['''New''' menu -> ''Options''] to see this extension).  On Windows you can open the file using Notepad to verify it is empty, if you gave accidentally created a file of another type like word processing it will be full of characters some of which do not display. Anyway, you must remove any extension from the file name so it is really just '''SSH'''.  Type into the file <tt>touch ssh</tt>, but nothing else, no empty lines, no end of line characters.
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.  
*On a Windows PC, if you right click (while viewing the boot directory on the card) there is an option called '''New'''  and if you select ''a text file'' it will create an empty file with the extension '''.txt'''. (In windows there is an option to hide extensions which is on by default, so you may need to deselect this option ['''New''' menu -> ''Options''] to see this extension).  On Windows you can open the file using Notepad to verify it is empty, if you gave accidentally created a file of another type like word processing it will be full of characters some of which do not display. Anyway, you must remove any extension from the file name so it is really just '''SSH'''.   
 
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.
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?====
====How to use SSH?====
5,838

edits