我的 EC2 实例数量似乎越来越多,而且一切运行良好。然而,我面临的一个问题是找出机器之间 SSH 的策略。将我的私钥复制到每个实例会适得其反,当我需要从我的个人机器通过 SSH 连接时它可以正常工作,但当我需要在机器之间进行 SSH 连接时就不行了。
有哪些不错的策略可以解决这个问题?您如何在 EC2 实例集群之间进行 SSH 连接?
在/home/petri/.ssh/我有我的私钥叫做petri. 当我尝试使用 ssh 连接到我的服务器时,它不接受我的私钥。运行-v了解到它没有尝试我的 key petry,而只是不存在的 id_rsa 和 id_dsa :
$ssh server
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: petri@office
debug1: Authentications that can continue: publickey
debug1: Offering public key: petri@office
debug1: Authentications that can continue: publickey
debug1: Offering public key: petri@office
debug1: Authentications that can continue: publickey
debug1: Offering public key: petri@office
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/petri/.ssh/id_rsa
debug1: …Run Code Online (Sandbox Code Playgroud) 我似乎找不到任何使用ssh界面禁用和重新启用机器的简单示例。有人能给我一个简短的例子或指向体面文档的指针吗?
我发现与此相关的所有内容都是“ssh-exchange-identification:”错误。这不会发生在我身上。我得到两行:
Connection to localhost closed by remote host.
Connection to localhost closed.
Run Code Online (Sandbox Code Playgroud)
ssh -v localhost 吐出:
OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to localhost [::1] port 22.
debug1: Connection established.
debug1: identity file /home/tim/.ssh/id_rsa type -1
debug1: identity file /home/tim/.ssh/id_rsa-cert type -1
debug1: identity file /home/tim/.ssh/id_dsa type -1
debug1: identity file /home/tim/.ssh/id_dsa-cert type -1
debug1: identity file /home/tim/.ssh/id_ecdsa type -1
debug1: identity file /home/tim/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用以下命令在 Ubuntu 上重新启动 SSH:
sudo /etc/init.d/ssh restart
Run Code Online (Sandbox Code Playgroud)
但这只是给了我:
不是通过 /etc/init.d 调用 init 脚本,而是使用 service(8) 实用程序,例如 service ssh restart
但是,运行它给出:
重启:未知实例:
跑步:
ps -A | grep ssh
Run Code Online (Sandbox Code Playgroud)
给出 3 个实例。
题
我如何判断哪个是我的实例,并杀死其他实例?这会允许我重新启动吗?
有人可以帮我吗?
我正在尝试将 SSH 隧道设置为 Web 代理,以便在我在公共场所时使用。我已经有一个远程服务器可以使用,而且我过去也使用过这台服务器。但是,现在当我尝试时,我成功建立了 SSH 连接,但是网络浏览器没有为我访问的每个页面返回任何数据。
我使用的 SSH 命令是:
ssh -ND 8080 -p 20000 myusername@myserver.com
这正确连接。如果我不包括 -N,那么我会正确地看到一个远程 shell,因此连接成功。
但是,当我将浏览器设置为使用本地代理时 - 每个页面都不会返回 HTML 数据。它也不会返回任何错误。字面上只是一个空白页。请注意,如果我断开 SSH 连接 - 则浏览器会显示代理错误。所以浏览器肯定是在用代理做一些事情。
如果我尝试这是 Chrome,那么我会收到一个 chrome 错误,明确指出“没有返回数据”。如果我在 Firefox 中尝试这个,那么我只会得到一个空白页面。
请注意,我只是在一个公共场所尝试此操作。我目前正在度假,正在使用公寓的 wifi 连接。所以我想这可能与他们的设置有关。但是,鉴于我可以成功通过 SSH 连接到我的服务器 - 我不确定他们的配置中的哪些内容会有所作为。请注意,我还尝试通过代理包含 DNS 查找。
我目前可以以 root 身份通过 ssh 登录到我的服务器。但是,可能还有一些其他用户具有 ssh 访问权限。我想阻止除 root 之外的任何可能的登录。我怎样才能做到这一点?
谢谢。
微软真的会验证 SSH 服务器吗?我的经理只允许我使用经过认证的产品,而不是开源的。我可以使用我的腻子客户端,所以我需要一个与腻子一起工作的 ssh 服务器。
我需要使用 openssh 设置 Archlinux vps,一切都运行顺利,除了我无法 ssh 进入。
我注意到没有安装 openssh,所以我查看了 wiki,上面写着:
pacman -S openssh
Run Code Online (Sandbox Code Playgroud)
我这样做了,但它开始给我错误,它在镜像上找不到 openssh-5.8p2-9-x86_64.pkg.tar.xz
error : failed retrieving file 'openssh-5.8p2-9-x86_64.pkg.tar.xz' from artfiles.org : No address record
Run Code Online (Sandbox Code Playgroud)
我添加了更多镜子,但仍然出现相同的错误。
我究竟做错了什么 ?
当我通过 SSH 连接到 CentOS 服务器的实例时,我注意到创建了这些文件:
11714560 9 月 14 日 02:18 core.1084
有谁知道这些是什么,也许为什么会这样?
ssh ×10
amazon-ec2 ×1
arch-linux ×1
centos ×1
cygwin ×1
f5-big-ip ×1
linux ×1
proxy ×1
ssh-tunnel ×1
ubuntu ×1
windows ×1