Code: Select all
ssh -vvv <pi3-ip-address> Code: Select all
ssh -vvv <pi-zero-ip-address> Thanks for the reply. I setup another piZero in the same manner, this time I use scp it ask for password on both side. P3 and piZero. I also did what you suggested. ssh -vvv <ip> both machine ask for password. The file sent just fine after I enter the password How can I get rid of this annoying password crap?UF_DoC wrote: ↑Sat Jan 06, 2018 5:30 pmSounds like something is wrong with the setup/content of authorized_keys file on the pi_zero.
In order to debug, first try a simple ssh between the two and ensure that both ways do not ask for passwords.
i.e.
from the pi-zero runand ensure you get in without any passwordCode: Select all
ssh -vvv <pi3-ip-address>
then from the pi3 runand confirm same.Code: Select all
ssh -vvv <pi-zero-ip-address>
If you cannot ssh into the pi-zero it means you have something setup incorrectly with authorized_keys file. or you have not added your key file correctly as an ssh id on the pi3. I refer to ssh-add command.
Hi UF_DoC, I did what you said, ssh -vvv xxx.xxx.xxx.xxx, I got this long response:UF_DoC wrote: ↑Sat Jan 06, 2018 8:36 pmYou need to understand keyless ssh setup.
Before you can scp files between pi's you need to be able to ssh between them without a password.
I assume you are not too security conscience and will be using the same public and private keys on both pis.
ensure you have the id_rsa, id_rsa.pub on both pi's in the ~/.ssh directory. ensure the permissions of this file is 600
i.e. chmod 600 ~/.ssh/id_rsa ~/.ssh/id_rsa.pub
run ssh-add ~/.ssh/id_rsa on both pi's
make sure authorized_keys keys has the id_rsa.pub as a line, better still, make it a copy of the id_rsa.pub i.e.
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
set authorized_keys permissions to 600 chmod 600 ~/.ssh/authorized_keys
try ssh between pi's and it should not ask for passwords anymore..
UNLESS!!! have you generated a password protected id_rsa key pair???
please copy and paste the output of the ssh -vvv <ip> command so we can see at which point it asks for a password.
Code: Select all
ls -la ~/.ssh
Both pis are target as well as source because I want to be able to scp from each other and both machine's .ssh/authorized_keys as well as .ssh/id_rsa and id_rsa.un are 600.rpdom wrote: ↑Sat Jan 06, 2018 10:45 pmWhat permissions have you got on the .ssh directory and the .ssh/authorized_keys files on the target Pi? If the permissions are insecure the ssh login won't work.
Useon the destination Pi (after logging in with password) to check.Code: Select all
ls -la ~/.ssh
Yes, but that is not what I asked. The permissions on the .ssh directory itself are also important.
The known_hosts file is a list of keys of servers that have previously connected to. This is used to confirm that it is the same server when you next connect to it.Also I am curious what the known_host file on both ~/.ssh do? Do they have something to do with ssh?
Code: Select all
tail -100f /var/log/auth.logChange your password...This msg "SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
" appears after I typed the password and everytime every time I boot up the pi, any idea how I can silence it?