I have a server with dedicated IP address A
and a server with dynamic IP address B
(routing via no-ip.org). A uploads a backup to B via sshpass:
export SSHPASS=***
sshpass -e sftp **@** << !
[..]
put [..]
bye
!
Every time now on (A) following happens:
Warning: Permanently added the ECDSA host key for IP address '[...]' to the list of known hosts.
I have some feeling that this might be not a safe method to transfer the backup data (tar file). Is it possible for someone to intercept the backup?
Also, shouldn’t I remove the IP from the list of known hosts again afterwards? The backup is run every day. Sounds like a long list of known hosts that are just dynamic!