As someone that is quite new to Linux i have been having quite a bit of trouble figuring out why my commands for ssh arent working i was trying to generate new ssh keys using “dpkg-reconfigure openssh-server” when I entered this in the terminal it gave me an error message saying “rescue-ssh.target is a disabled or a static unit, not starting it” do I need to somehow start up the shh service I have tried to restart the service for ssh and then I get an issue that it says there is no such service.
I am using a raspberry pi model 3b running Kali Linux.
In addition to Dynamic Gravity’s suggestion to confirm it’s installed…
[I] have tried to restart the service for ssh and then I get an issue that it says there is no such service.
If you ever encounter a service without an obvious unit, try adding a ‘d’ to the service name. Lots of them are aliased, but not all, and it’s possible Kali’s missing it.
These commands do seem to work the problem is that after using them i got no error but when i used the command from my first post to generate new ssh keys i still got this error “rescue-ssh.target is a disabled or a static unit, not starting it”.
is there any other way i can generate and access new ssh keys?
I’m not sure if you where referring to an earlier persons code or not i tried to run “systemctl start sshd” it ran fine gave no output but when i ran the command to generate new ssh keys i got the same error as i posted in the first post.
normaly ssh keys for a user are generated using ssh-keygen
You’re correct for user keys.
The SSH daemon also has a set, which is the source of the SSH fingerprint you verify on first connection (or publish in SSHFP records). Those are located in /etc/ssh/ssh_host_*, and generated by dpkg at install time.
User keys are only exchanged at connection, and don’t require a service to be running.
Thanks. I knew that, i just never had to generate new keys for the Server, that’s why i was confused. I’ll copy that to my Notebook though, should i ever come across that on one of our Servers.
I Nmap attacked my raspberry pi and tho error message says openssh is down. Nmap says it’s running on port 22 thus it’s working don’t worry about the error message.
Hi. I am having the same problem and I tried to delete the ssh_host* files with “rm /etc/ssh/ssh_host*” and it seems to work. I cd to /etc/ssh and do ls -l and the files are gone. When I dkpg-reconfigure openssh-server it still outputs the same error, despite it saying that it is creating new keys. I try to ls -l again on the directory, and the date does not change. Somehow it rewrites the old keys back. What can I do to solve this?