I have a Remote Port Forward SSH tunnel from the host1 the host0 at port 10022 through:
$ autossh -R 10022:localhost:22 host0
With host0 record in the ~/.ssh/config file both at host1 and host0:
# host0
Host host0
Hostname host0ddnsip
Port 1022
User host0user
Established from the host0 to the host1 through:
$ ssh -p 10022 host1user@localhost
Which is done passwordless succesfully. The string host0ddnsip is the server DNS from a free service ("host0".dynu.net hosted by www.dynu.com).
The keys are stored all together in the file ~/.ssh/authorized_keys both at host1 and host0:
ssh-rsa AFAF... ...AFAF host0user@host0
ssh-rsa AFAF... ...AFAF host1user@host1
When doing the connection:
$ ssh -p 1022 host0user@host0ddnsip
It always requests for the password. The same happens with autossh going idle some hours at host1, turning it useless because it wants a password after that:
$ ECDSA host key for IP address 'host0ddnsip' not in list of known hosts.
$ host0user@host0ddnsip's password:
Also at host0 the password is also requested:
$ host0user@host0ddnsip's password:
How should i make the configuration in this case?