tolstoyevsky / pieman

A script for creating custom OS images for single-board computers
GNU General Public License v3.0
214 stars 31 forks source link

SSH is not working from other PC's to Raspberry pi #283

Closed Beebeejohn closed 3 years ago

Beebeejohn commented 3 years ago

I have installed ssh by using sudo env INCLUDES=ssh pieman.sh. But after flashing the os, I am unable to do ssh from my PC to raspberry Pi whereas ssh is possible from raspberry pi board to other PC's. Can anyone tell me how to solve this issue. If I do ssh pi@ip address, it is showing like permission denied, although I have used same password used in pieman.sh script

eugulixes commented 3 years ago

There is no any pi user in your image. Please, have a look at the USER_NAME param in the documentation. The default value is cusdeb, so ssh using ssh cusdeb@ip address

Beebeejohn commented 3 years ago

No actually I have changed username as pi in pieman.sh script and try giving ssh pi@ip address. It is not working I meant. Can you tell me how to fix this isssue. Can't we change that username and password based on our requirement. Should it be only cusdeb as username and secret as password allways

eugulixes commented 3 years ago

You shouldn't edit pieman.sh manually. Use environment variables, instead. For example, sudo INCLUDES=ssh USER_NAME=pi USER_PASSWORD=super-secret ./pieman.sh

Beebeejohn commented 3 years ago

Ok. Will try that. Similarly if I want to add SSID and password for wpa_suupplicant, and different raspberry pi devices like rpi-zero-w should I mention as follows:, sudo INCLUDES = WPA_SSID= ** WPA_PSK=pwd, DEVICE=rpi-zero-w ./pieman.sh**, or can I edit in pieman.sh. Because previously for wifi and different devices, I edit pieman.sh manually, and raspberry pi gets connected to the Wi-fi details as I mentioned in pieman.sh script. And also please tell me how to add daemon program before building raspberry pi Os

eugulixes commented 3 years ago

or I can edit in pieman.sh

You can but you shouldn't =) You shouldn't edit the source code of pieman.sh to simply pass some params to it. There is well documented interface based on environment variables. How I can help you when I don't even know what changes you made to the source code? I highly encourage you to modify the source code in case 1) it helps you understand how Pieman works and 2) you develop new features.

I edit pieman.sh manually, and raspberry pi gets connected to the Wi-fi details as I mentioned in pieman.sh script

You should use the WPA_SSID and WPA_PSK environment variables for it.

And also please tell me how to add daemon program before building raspberry pi Os

I will answer in the corresponding issue (i.e. https://github.com/tolstoyevsky/pieman/issues/281).

Beebeejohn commented 3 years ago

Is this command correct for mentioning ssid and password sudo INCLUDES = WPA_SSID= Rpi WPA_PSK=pwd, DEVICE=rpi-zero-w ./pieman.sh. I have not changed much in the source code. In the source code, instead of rpi-3-b device, I mentioned as rpi-zero-w. Similarly for WPA_SSid and PSK , I mentioned those credentials. That's all. Can you please tell me whether the above command is correct

eugulixes commented 3 years ago

No, it doesn't seem to be correct. The reasons are

Beebeejohn commented 3 years ago

Actually I did not get the 2nd point. INCLUDES seem to be empty means?? Then how can I mention ssid details. Now can you tell me whether this is correct. I removed spaces sudo INCLUDES=WPA_SSID= Rpi **WPA_PSK=pwd, DEVICE=rpi-zero-w ./pieman.sh

eugulixes commented 3 years ago

The INCLUDES param tells which packages must be installed to your operating system image. It's not connected with WPA_SSID and WPA_PSK at all. Please, have a look at the corresponding section of the documentation.

Beebeejohn commented 3 years ago

Ya ok will look onto it . Thank you for the reply

eugulixes commented 3 years ago

You're welcome. Closing the issue. Feel free to re-open it if you have further questions.