- Create a ssh connection to your linux station.
- Type
screen
and then start the process you want. (assumption, screen is installed) - Press Ctrl-a and then Ctrl-Shift-D.
- You can now log out of the ssh session.
- In case you can come-back later you can type screen -r. This will resume your screen session and you can see the output of your processes.
Tag: ssh
Headless Raspberry Pi
Step 1. Download a lite Raspbian image
Download the version you need. As we want to install a headless version download the Raspian XXXXX Lite version.
Step 2. Copy the image
From a Linux terminal use the following command to find your SD Card:
sudo fdisk -l
This will show you something like
Disk /dev/sdc 14.86 Gib ......
Ensure you select here the correct disk.
Afterwards copy the image with the following comand. Replace /dev/sdX by the correct path.
sudo dd bs=4M if=2019-07-10-raspbian-buster.img of=/dev/sdX conv=fsync
Step 3. Enable ssh
To activate ssh at the first start you just have to create a file ssh in the boot folder.
touch /run/media/your_username/boot/ssh
The path above might be different on your system.
Step 4. Add network info
Create a file in /run/media/your_username/boot/ called: wpa_supplicant.conf.
sudo nano /run/media/your_username/boot/wpa_supplicant.conf
Then paste the following into it (replace your country code, SSID and Password):
ctrl_interface=DIR=/var/run/wpa_supplicantĀ GROUP=netdev update_config=1 ap_scan=1 fast_reauth=1 country=JP network= { ssid="network SSID" psk="network password" id_str="0" priority=100 }
Step 5. Find your Raspberry Pi in your network
One solution is to login to your router.
In case you do not have access to your router you can scan your ip range with nmap. Use the following command and search for your Raspberry Pi:
sudo nmap -sP 192.168.0.0/24
Adjust 192.168.0.0 to your ip range. In many cases it is 192.168.1.0 or 192.168.100.0
Step 6. Login to your Raspberry Pi
Use the following command to login:
ssh pi@192.168.0.150 Password by default: raspberry