0

I am trying to ssh/scp from one machine on my network to another. The problem is that when I execute an ssh/scp command (ssh user@ip_machine_2) it is only "working" when I am logged in to the root account on machine_1. When sending this command as root I am prompted for the user' password on machine_2 and then I can access the account/transfer a file without any issues.

If I log into the user account on machine_1 and repeat the command I am now getting an error: "Host key verification failed."

Does any one have any idea on what could be causing this when not logged into the root account? I checked the permissions for both ssh and scp and they seem fine, so I think the user account might be missing some permissions for something critical in the network stack in order for ssh to work under this account.

2
  • 1
    Did machine_2 recently re-generate its host keys? If you trust the machine, you could delete its public keys from ~/.ssh/known_hosts (which I assume that the warning message also tells you).
    – Kusalananda
    Feb 21, 2022 at 22:16
  • Does any of these answers help?
    – Kusalananda
    Feb 21, 2022 at 22:50

1 Answer 1

-1

So for me the issue ended up being the permissions for /dev/tty which were set to 0664 under root. Changing the permissions to 0666 resolved the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .