ssh-import-id-lp prints out 4 SHA lines of letters but no /authorized keys files found.

Asked by goh on 2018-10-07

What i remembered:
1) generated some ssh keys a few weeks ago
2) Yesterday used ssh-import-id-lp and on screen it prints 4 lines of SHA 256 string letters.
3) However i am unable to locate the /etc/ssh/authorized keys files and also any keys of this nature in /usr/bin/ssh files(expected
     outputs in../authorised keys or /usr/bin/ssh files)
4)But i can locate some keys in the /host keys:
rw------- 1 root root 672 Sep 18 09:13 ssh_host_dsa_key
-rw-r--r-- 1 root root 604 Sep 18 09:13 ssh_host_dsa_key.pub
-rw------- 1 root root 227 Sep 18 09:13 ssh_host_ecdsa_key
-rw-r--r-- 1 root root 176 Sep 18 09:13 ssh_host_ecdsa_key.pub
-rw------- 1 root root 411 Sep 18 09:13 ssh_host_ed25519_key
-rw-r--r-- 1 root root 96 Sep 18 09:13 ssh_host_ed25519_key.pub
-rw------- 1 root root 1675 Sep 18 09:13 ssh_host_rsa_key
-rw-r--r-- 1 root root 396 Sep 18 09:13 ssh_host_rsa_key.pub.

Those keys above i do not remember generating manually which i speculate is to be used automatically and not related to my action as said in item 2 above.

i am using Acer Intel Celeron 1.8Ghz 4Ram; Ubuntu 18.04 server Bionic Beaver; Icewm operating system.

My question is;
a) Did i manage to import the ssh-id-lp as 2) above?
b)If yes, where or how (easiest way) can i locate the files?
c)Has my system been compromised? Ufw not activated.
d)Any advice to reasonably secure my system is appreciated.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
2018-10-08
Last query:
2018-10-08
Last reply:
2018-10-07

Put the public keys in ~/. ssh/authorised_keys on the server side

goh (ontheway2) said : #2

Thanks actionparsnip, that solved my question.

goh (ontheway2) said : #3

Hi sorry to bother you again.
In my haste and curiosity, i deleted three of my hostkey.pub that is DSA, ECDSA, Ed25519 public keys. They appeared to be system generated during installation of unix. Now unable to update packages.

How can i restore those keys :
1) from private keys if possible offline mode, any software or packages i can download
2) or other methods.

I have tried using ssh-import-id-lp -output unconfirmed. Does not show in the ~/Hostkey files or anywhere nearby

i also tried the dpkg-reconfigure openssh-server but no output. Perhaps ~/openssh/sshd_config needs configuration

Using SSh-keygen produced some "output files" as said on screen but i am unable to locate them to confirm.

i am a beginer. Please help

Thank you.