0

In UBUNTU system, I'm trying to set up remote login system. It is failing in ssh-copy-id step. It throws the following error:

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: ERROR: ssh: connect to host XXX.XXX.XX.XXX port 22: Connection refused

Trying ssh XXX.XXX.XX.XXX gives-

The authenticity of host 'XXX.XXX.XX.XXX (XXX.XXX.XX.XXX)' can't be established.
ED25519 key fingerprint is SHA256:*********.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? ssh [email protected]
Please type 'yes', 'no' or the fingerprint: 

What can I do? Thanks in advance. N.B. I tried the steps several times following different tutorials and while starting afresh each time, I just removed the files under /.ssh folder.

8
  • 2
    Is 192.168.59.253 the correct IP? Does that machine have a running ssh daemon listening for connections on port 22? Can you run ssh 192.168.59.253? What happens? Do you log in? Please edit your question and add this information.
    – terdon
    Commented Oct 25, 2023 at 11:58
  • @terdon I edited the post accordingly.
    – nishat
    Commented Oct 29, 2023 at 6:46
  • Did you try typing yes at the prompt?
    – terdon
    Commented Oct 29, 2023 at 12:12
  • Yes. It then seems like I am connected to the host. But this doesn't work for remote computers. It happens only when I run the command from the host.
    – nishat
    Commented Oct 29, 2023 at 18:55
  • Sorry, what? What host? Why are you mentioning the host now? Please tell us i) what happens when you ssh 192.168.59.253 (these are local IPs, of your local network, and not accessible from outside the network, there is no reason to hide the IP) and ii) assuming you get the prompt you show, and write yes to connect, what happens if you try ssh-copy-id AFTER connecting manually once, and disconnecting.
    – terdon
    Commented Oct 30, 2023 at 9:24

0

You must log in to answer this question.

Browse other questions tagged .