作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试连接两个 Microsoft Azure 虚拟机。两者都位于同一虚拟网络上。当我尝试使用 ssh 连接时,终端返回权限被拒绝(公钥)。想一想为什么我会收到此错误?我尝试检查我的网络入站/出站端口规则,虚拟网络上没有防火墙。
所以我的问题不在于我的机器和虚拟机之间的连接,这工作正常。我无法在两个虚拟机之间使用 ssh 连接。
最佳答案
看看这个描述:
When you use an SSH client to connect to your Linux VM (which has the public key), the remote VM tests the client to make sure it possesses the private key. If the client has the private key, it's granted access to the VM.
问题似乎出在您的公钥上。使用公钥创建 Azure VM 时,应确保公钥也位于您的主目录中,例如 ~/.ssh/。这意味着您的本地计算机和虚拟机都存储了公钥。然后,您可以使用公钥通过本地计算机接受的权限来 ssh 您的 Azure VM。可以看到步骤How to create the VM with a public key .
关于azure - 无法连接两个 Azure 虚拟机 - 权限被拒绝(公钥),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54281307/
我是一名优秀的程序员,十分优秀!