无法在 windows 上使用 Putty 在 aws 上创建到 Zeppelin web 显示的 SSH 隧道
Cannot create an SSH tunnel to Zeppelin web display on aws, using Putty on windows
以下说明适用于我尝试连接的 ec2 实例:
To access your instance: Open an SSH client. (find out how to connect
using PuTTY)
检查!
Locate your private key file (keypair.pem). The wizard automatically
detects the key you used to launch the instance.
我用 .ppk 启动了 Putty,我的本地机器上还有 .pem。但是,一旦我进入 aws Linux 终端,这有什么帮助?
在我看来,.pem 现在应该位于远程机器上,而不是我的本地机器上。
Your key must not be publicly viewable for SSH to work. Use this
command if needed: chmod 400 keypair.pem
一旦上一步更清楚,就可以了。
Connect to your instance using its Public DNS:
ec2-xxxxxxxxxxxxx.eu-west-1.compute.amazonaws.com
Example: ssh -i "keypair.pem"
root@ec2-xxxxxxxxxxxxx.eu-west-1.compute.amazonaws.com
我目前正在输入这个(也尝试使用 ec2-user 而不是 root)但我得到以下信息:
警告:标识文件keypair.pem不可访问:没有这样的文件或目录。
权限被拒绝(公钥)。
Please note that in most cases the username above will be correct,
however please ensure that you read your AMI usage instructions to
ensure that the AMI owner has not changed the default AMI username.
如果这很重要,他们在这里指的是什么用户名?
我还确保我可以从所有位置通过 SSH 进入安全组。
Christopher,我不确定你是否有权访问 AWS 控制台,但如果你这样做,那么很容易找出你的 EC2 机器的正确用户名。单击复选标记框选择您的实例,然后单击连接,它会显示正确的用户名。如果它是 amazon AMI 映像,它很可能是 ec2-user,其他映像可以有 root、ubuntu、bitnami 或 AMI 创建者配置的任何其他用户。
您的错误消息:“警告:身份文件 keypair.pem 不可访问”表示您的私钥不可访问的问题。
您说您将 .pem 转换为 ppk 用于 putty,这将使您能够通过 putty 进行 SSH。如果您需要从一台 EC2 机器通过 SSH 连接到另一台 EC2 机器,您将需要带有 "pem" 扩展名的私钥。
将您的私钥视为您的密码,只是它存储在一个文件中。
ssh -i "keypair.pem" root@ec2-xxxxxxxxxxxxx.eu-west-1.compute.amazonaws.com
此命令表示:通过 SSH 协议将我登录到服务器 xxxx.eu... 使用位于当前目录中的密码文件(私钥)"keypair.pem"。
如果您执行了 "ls" 而没有看到 "keypair.pem",那么这就是您的问题。
希望对您有所帮助!
以下说明适用于我尝试连接的 ec2 实例:
To access your instance: Open an SSH client. (find out how to connect using PuTTY)
检查!
Locate your private key file (keypair.pem). The wizard automatically detects the key you used to launch the instance.
我用 .ppk 启动了 Putty,我的本地机器上还有 .pem。但是,一旦我进入 aws Linux 终端,这有什么帮助? 在我看来,.pem 现在应该位于远程机器上,而不是我的本地机器上。
Your key must not be publicly viewable for SSH to work. Use this command if needed: chmod 400 keypair.pem
一旦上一步更清楚,就可以了。
Connect to your instance using its Public DNS: ec2-xxxxxxxxxxxxx.eu-west-1.compute.amazonaws.com
Example: ssh -i "keypair.pem" root@ec2-xxxxxxxxxxxxx.eu-west-1.compute.amazonaws.com
我目前正在输入这个(也尝试使用 ec2-user 而不是 root)但我得到以下信息: 警告:标识文件keypair.pem不可访问:没有这样的文件或目录。 权限被拒绝(公钥)。
Please note that in most cases the username above will be correct, however please ensure that you read your AMI usage instructions to ensure that the AMI owner has not changed the default AMI username.
如果这很重要,他们在这里指的是什么用户名?
我还确保我可以从所有位置通过 SSH 进入安全组。
Christopher,我不确定你是否有权访问 AWS 控制台,但如果你这样做,那么很容易找出你的 EC2 机器的正确用户名。单击复选标记框选择您的实例,然后单击连接,它会显示正确的用户名。如果它是 amazon AMI 映像,它很可能是 ec2-user,其他映像可以有 root、ubuntu、bitnami 或 AMI 创建者配置的任何其他用户。 您的错误消息:“警告:身份文件 keypair.pem 不可访问”表示您的私钥不可访问的问题。 您说您将 .pem 转换为 ppk 用于 putty,这将使您能够通过 putty 进行 SSH。如果您需要从一台 EC2 机器通过 SSH 连接到另一台 EC2 机器,您将需要带有 "pem" 扩展名的私钥。 将您的私钥视为您的密码,只是它存储在一个文件中。 ssh -i "keypair.pem" root@ec2-xxxxxxxxxxxxx.eu-west-1.compute.amazonaws.com 此命令表示:通过 SSH 协议将我登录到服务器 xxxx.eu... 使用位于当前目录中的密码文件(私钥)"keypair.pem"。 如果您执行了 "ls" 而没有看到 "keypair.pem",那么这就是您的问题。 希望对您有所帮助!