Closed baoyachi closed 1 year ago
Well, did you re-install the remote server, or are you trying to connect to a ssh server inside container?
In that case, the remote host identification does change and it will get rejected by ssh
, I would suggest using a temporary ssh know_hosts
file by using tempfile
and SessionBuilder::user_known_hosts_file
Yeah, I used docker started sftp-server.
Yeah, I used docker started sftp-server.
I recommend you to use a tempfile as ssh known_hosta as suggested by my previous comment
Now, use /dev/null
path replace.
Now, use
/dev/null
path replace.
Hmmm, does that work for you?
Now, use
/dev/null
path replace.Hmmm, does that work for you?
Yes.
When restarting the sftp service, SSH authentication fails. The warning logs: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
The detail log:
So, how to manage ~/.ssh/known_hosts file when sftp-server restart, that authentication fails.