linux - 无法从 Linux 和 Mac SSH 到域中的 cygwin
问题描述
在此页面之后,我在作为 Windows(Samba) 域成员运行的 Windows 10 计算机中成功配置了 Cygwin sshd。
我可以从域内的 Windows 10 和域外的 Windows 10 SSH 到那台机器。在这两种情况下,我都在 Cygwin 中运行 ssh 命令。
但是,我无法从域外的 Linux Debian 10 机器连接,我无法从运行 Samba DC 的 Linux Debian 10 连接,我无法从域外的 Mac 连接。
有任何想法吗?
我总是使用相同的命令来启动连接ssh nicola@domus
,在每个操作系统中都是相同的。我附上了我在尝试通过 Linux 连接时看到的最后一部分。
$> ssh -vvv nicola@domus
...
debug3: hostkeys_foreach: reading file "/home/p/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/p/.ssh/known_hosts:76
debug3: load_hostkeys: loaded 1 keys from 172.16.3.53
debug1: Host 'domus' is known and matches the ECDSA host key.
debug1: Found key in /home/p/.ssh/known_hosts:75
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug1: Will attempt key: /home/p/.ssh/id_rsa RSA SHA256:hcDASnV1vvd88xpKM/xN2XtUSCvcW3oPUz0izqFMTBE
debug1: Will attempt key: /home/p/.ssh/id_dsa
debug1: Will attempt key: /home/p/.ssh/id_ecdsa
debug1: Will attempt key: /home/p/.ssh/id_ed25519
debug1: Will attempt key: /home/p/.ssh/id_xmss
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/p/.ssh/id_rsa RSA SHA256:hcDASnV1vvd88xpKM/xN2XtUSCvcW3oPUz0izqFMTBE
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
Connection closed by 172.16.3.53 port 22
解决方案
我在发布后发现,如果我强制密码验证,我实际上可以通过 Linux 和 Mac 进行连接。
ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no nicola@domus
但是,我认为这更像是一个快速修复而不是解决方案。你有更好的想法吗?
推荐阅读
- node.js - 如何将上传到表单的文件写入磁盘?
- azure - 如何在 Azure 上使用 Spark 和数据工厂来加载和转换 2 个包含数据的文件
- python - 难以在 2 层 RNN 中正确设置批量大小
- ios - 更改表格第一个单元格的背景图像
- angular - Tiny MCE Angular 集成第二编辑器
- eloquent - 从资源模板 Laravel 7 和 8 中排除字段
- terraform - Terraform 错误:等待 sagemaker 笔记本实例创建时出错:意外状态“失败”,想要目标“InService”。最后一个错误:%!s(
) - android - 约束中的 android:visibility 和 PropertySet android:visibility 有什么区别
- python - Python - 寻找一种方法来提高效率
- vue.js - 本地存储输入字段显示未定义值