The authenticity of host '[localhost]:2222 ([::1]:2222)' can't be established. ED25526 key fingerprint is SHA256:FUCkkcufctB3fasdf45sszVCaqRQTY7+Qasjw235A+XwCg. ED25526 key fingerprint is MD5:17:fu:ck:3d:bb:aa:00:35:79:ac:bc:cc:dc:ec:71:bb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[localhost]:2222' (ED25526) to the list of known hosts.
如果重新启动(这样也算是首次运行),则会提示:
1 2 3 4 5 6 7 8 9 10 11
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ED25519 key sent by the remote host is SHA256:FTKtctB6yBQasdfasdfasdf3fasdf7+QSBTLyyasdfasdfasdfCg. Please contact your system administrator. Add correct host key in /home/lateee/.ssh/known_hosts to get rid of this message. Offending ED25526 key in /home/lateee/.ssh/known_hosts:4
$ sftp -P2222 foo@127.0.0.1 Connection closed by 127.0.0.1 port 2222 Couldn't read packet: Connection reset by peer
经查,是因为 sftp 服务器目录在 Windows 系统,改为 Linux 系统,问题解决。(为减少虚拟机空间占用,并方便调试,笔者习惯使用虚拟机的共享目录,在 Linux 中操作 Windows 硬盘。)
某天运行时,提示:
1 2 3 4 5 6 7 8
$ docker-compose up Creating network "sftp_default" with the default driver Creating sftp ... done Attaching to sftp sftp | [/usr/local/bin/create-sftp-user] Parsing user data: "aftp:passworld:1000" sftp | [/entrypoint] Executing sshd sftp | /run/sshd must be owned by root and not group or world-writable. sftp exited with code 255