PDA

View Full Version : ssh connection without parameter



Trial
25-02-23, 10:56
Hi,
I am trying to manage my VUs with scripts on different Linux PCs. For this I need a root@ip-number login without password. On the Linux PCs OpenSSH is running. I copy the public key with ssh-copy-id and it looks correct on the VU after that. I still need a password to login with ssh root@ip-number. What am I missing?

Ralf

birdman
25-02-23, 20:12
Hi,
I am trying to manage my VUs with scripts on different Linux PCs. For this I need a root@ip-number login without password. On the Linux PCs OpenSSH is running.
It's a server process, so needs to be running on he Vix box.


I copy the public key with ssh-copy-id and it looks correct on the VU after that. I still need a password to login with ssh root@ip-number. What am I missing?
It needs to be in a file called authorized_keys in ~/.ssh.

Trial
26-02-23, 09:50
Hi,
ssh-copy-id succeeded but I still cannot login without password. I guess it might have to do something with the account and name of the client which is at the end of the pub file. My client is root@Symcon-6 but in the pub file it is a different name Symcon-6.4.331

Are these information at the end of the pub file important?

Ralf

birdman
27-02-23, 02:59
Are these information at the end of the pub file important?Irrelevant to ssh. Only there for human readers.

birdman
27-02-23, 03:06
Does the content of the authorised_keys file on the VUs correspond to the *.pub file you have on the clients?

What type of key are you using? Mine are ecdsa and I have no problems.

Trial
27-02-23, 08:57
Hi,
at the moment rsa. I will try ecdsa in a moment. Now pub key starts with ecdsa-sha2-nistp256 and it is in the dropbear directory in authorized keys and on the client know_hosts is also created. It worked for quite a few month and no I cannot make it to work anymore. Merde:-(

Ralf

birdman
27-02-23, 13:05
Hi,
at the moment rsa. I will try ecdsa in a moment. Now pub key starts with ecdsa-sha2-nistp256 and it is in the dropbear directory in authorized keysdropbear?
Ah, that's a slightly different beast - I'd forgotten.
But the authorized_keys file should still be in ~/.ssh. There is no account-based dropbear directory.

Trial
28-02-23, 08:43
Hi,
for dropbear it is /etc/dropbear Yesterday I looked together with a friend which uses Linux for more than 20 years and hi also had no idea. Everythink looks OK with one problem it does not work:-(

Removed autorized_key, created new key on client side with ssh-keygen, copy pub key with ssh-copy-id. Pub key on client is exactly the same as authorized_keys on VU. There is also no option to enable root access without password only options to disable it and I looked into /etc/init.d/dropbear and there is no such option used.

Ralf


Ralf

birdman
28-02-23, 13:37
Hi,
for dropbear it is /etc/dropbearThat's where the system key goes.

My authorised_keys is in ~/.ssh. And it works. Have you actually tried putting it there?


Yesterday I looked together with a friend which uses Linux for more than 20 yearsI've worked with it for over 30, if it helps.

Trial
28-02-23, 14:00
Hi,
mistery and problem solved. With ssh-copy-id the public key is copied to /etc/dropbear/authorized_keys but it must (now) be in /home/root/.ssh/authorized_keys. Perhaps there was an update for dropbear in the last week. It still worked for me until January before.

Ralf

birdman
28-02-23, 18:43
Hi,
mistery and problem solved. With ssh-copy-id the public key is copied to /etc/dropbear/authorized_keys but it must (now) be in /home/root/.ssh/authorized_keys. Perhaps there was an update for dropbear in the last week. It still worked for me until January before.Mine has been in ~/.ssh since I started using ssh on the boxes (so a few years at least).

Trial
01-03-23, 08:43
Hi,
I think the problem is the communication between ssh and dropbear. ssh-copy-id uses the wrong directory.

Ralf