【发布时间】:2019-10-10 16:46:05
【问题描述】:
PuTTy AWS 没有这样的文件或目录
- 1 - 在 AWS ubuntu 上创建了 ec2 实例
- 2 - 下载密钥(.pem 文件)
- 3 - 因为我用的是windows,所以我下载了PuTTy
- 4 - 生成一个腻子文件
- 5 - 我使用 Putty
(login as: ubuntu Authenticating with public key "imported-openssh-key" )登录
- 6 - 现在需要运行:
cd path/to/my/dev/folder/
chmod 400 JupyterKey.pem
ssh ubuntu@11-111-111 -i JupyterKey.pem
# 不行!!
所以我连接到腻子,现在我尝试打开密钥(automation.pem)以连接服务器 AWS 以开始构建我的 jupyter 笔记本
# First attempt
[ec2-user@ip-111-11-11-111 ~]$ cd \Users\pb\Desktop\pYTHON\AWS\server
-bash: cd: UserspbDesktoppYTHONAWSserver: No such file or directory
# Second attempt
[ec2-user@ip-111-11-11-111 ~]$ ssh -i "imported-openssh-key" ubuntu@ec2-54-67-50-191.us-west-1.compute.amazonaws.com
Warning: Identity file imported-openssh-key not accessible: No such file or directory.
The authenticity of host 'ec2-ip-111-11-11-111.us-west-1.compute.amazonaws.com (ip-111-11-11-111)' can't be established.
ECDSA key fingerprint is 11111111111111111111111111111111111111111111111111111.
ECDSA key fingerprint is 11111111111111111111111111111111111111111111111111111.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-11-111-111.us-west-1.compute.amazonaws.com,11-111-1191' (ECDSA) to the list of known hosts.
Permission denied (publickey).
[ec2-user@ip-172-31-28-150 ~]$
【问题讨论】:
-
您已连接到远程计算机,试图从该远程计算机访问本地计算机上的文件。那永远行不通。如果您需要从远程计算机访问 PEM,则需要将其复制到该远程计算机。你有编程问题吗?如果没有,这更适合 SuperUser。
-
对不起@Adrian,他们没有告诉我我只能在注册时在这个网站上提出编程问题,我的错。那么如何将它复制到该远程机器上呢?喜欢具体的地方
-
使用 scp(安全拷贝)将它放到你的 Ubuntu 服务器上
标签: python amazon-web-services jupyter-notebook putty