- 浏览: 21381 次
- 性别:
- 来自: 北京
文章分类
最新评论
1.ssh -v hdfs@192.168.18.133 出现
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
错误
运行状况如下:
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to 192.168.18.133 [192.168.18.133] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/identity-cert type -1 debug1: identity file /root/.ssh/id_rsa type 1 debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1: identity file /root/.ssh/id_ecdsa type -1 debug1: identity file /root/.ssh/id_ecdsa-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host '192.168.18.133' is known and matches the RSA host key. debug1: Found key in /root/.ssh/known_hosts:2 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: gssapi-keyex debug1: No valid Key exchange context debug1: Next authentication method: gssapi-with-mic debug1: Unspecified GSS failure. Minor code may provide more information Credentials cache file '/tmp/krb5cc_0' not found debug1: Unspecified GSS failure. Minor code may provide more information Credentials cache file '/tmp/krb5cc_0' not found debug1: Unspecified GSS failure. Minor code may provide more information debug1: Unspecified GSS failure. Minor code may provide more information Credentials cache file '/tmp/krb5cc_0' not found debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug1: Offering public key: /root/.ssh/id_rsa debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Trying private key: /root/.ssh/id_dsa debug1: Trying private key: /root/.ssh/id_ecdsa debug1: No more authentication methods to try. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
解决办法:
1、查看我的密钥, ls ~/.ssh/ :
[root@localhost .ssh]# ls ~/.ssh/
authorized_keys id_rsa id_rsa.pub known_hosts
2、发现我的id_rsa文件我命令为id_rsa, 所以根本没有使用它。
同时可以使用如下命令查看密钥列表:
ssh-add -l
[root@localhost .ssh]# ssh-add -l
The agent has no identities.
3、上面命令的密钥列表为空,所以要添加我的密钥,使用命令:
[root@localhost .ssh]# ssh-add id_rsa
Identity added: id_rsa (id_rsa)
4、再次查看,如下,添加成功:
[root@localhost .ssh]# ssh-add -l
2048 c6:60:c6:f8:29:25:0b:87:27:9c:37:5e:77:ec:05:e4 id_rsa (RSA)
5、再使用 ssh -v hdfs@192.168.18.133测试连接,可以看到验证通过:
[root@localhost .ssh]# ssh -v hdfs@192.168.18.133
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.18.133 [192.168.18.133] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/identity-cert type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.18.133' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_0' not found
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_0' not found
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_0' not found
debug1: Next authentication method: publickey
debug1: Offering public key: id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = zh_CN.UTF-8
6.测试成功
发表评论
-
VMware虚拟机中的CentOS安装Nginx后本机无法访问的解决办法
2015-10-25 21:28 2056具体情况如下 1。本机能ping通虚拟机 2。虚拟机也能pin ... -
Linux中find常见用法示例
2015-05-10 21:38 462Linux中find常见用法示例 ·find path ... -
Jenkins 命令行操作说明文档
2015-04-30 17:01 2089假设Jenkins的URL为http://22.11.140 ... -
Linux awk命令详解
2015-04-29 12:02 786一. AWK 说明 awk是一种编程语言,用于在linu ... -
Linux下Mysql源码安装
2015-02-13 16:42 9341.假设已经有mysql-5.6.23-linux-glibc ... -
vim基本命令
2015-02-12 10:08 5641. vim #在命令行中输入vim,进入vim编辑器 2. ... -
Linux命令
2015-02-10 16:47 511系统信息 arch 显示机器的处理器架构(1) uname ... -
Nginx负载均衡
2015-02-02 14:13 711Nginx负载均衡一些基础知识: nginx 的 upstr ... -
Nginx安装部署
2015-02-02 14:10 635Nginx ("engine x") 是一 ...
相关推荐
**Ruby-Capistrano:基于Ruby、Rake和SSH的部署自动化工具** Capistrano是一款强大的、开源的部署自动化工具,它主要由Ruby语言编写,利用Rake作为任务执行引擎,并通过SSH(Secure Shell)协议与远程服务器进行...
* SSH Server:服务器端需要安装 SSH 服务器,以便 Capistrano 3 可以连接到服务器。 * SSH Client:开发机端需要安装 SSH 客户端,以便 Capistrano 3 可以连接到服务器。 * SCM(Source Control Management):版本...
支持的标签latest 卡皮斯特拉诺 3.3.5 Ruby 2.1.5 Ubuntu 14.04 LTS如何使用$ docker run \ --rm \ -it \ --name capistrano \ -v /path/to/.ssh:/capistrano/.ssh \ quay.io/spesnova/capistrano \ cap -T 每次输入...
仅当名为“ localhost”的目标主机时, capistrano-locally才会在不使用SSH的情况下capistrano-locally部署因此,您无需在server 'localhost'上编写SSH用户和配置。安装将此行添加到您的应用程序的Gemfile中: gem ...
Capistrano SSH配方,用于启动SSH与远程服务器的连接。 安装 gem install sushi 配置 将以下行添加到config / deploy.rb中: require 'sushi/ssh' 用法 cap ssh # or in case when multistage support used: ...
CapistranoDb任务| 将数据库和资产任务添加到Capistrano到Rails项目。 它仅适用于capistrano3。0.3之前的较早版本适用于capistrano 2。 现在它仅支持mysql和postgresql(远程和本地) 将资产远程同步到本地,将本地...
rvm-capistrano, rvm/Capistrano 集成 gem 描述rvm/Capistrano 集成 gem兼容性带Autolibs的rvm-capistrano 1.3.0 至少需要 RVM 1.19.0 。如果你使用 capistrano 3.0.0,则无法使用这里选项,请将它的扩展到
gem-capistrano-wp, 使用 Capistrano 部署和管理WordPress站点的诀窍 capistrano-wp使用 Capistrano 部署和维护远程WordPress安装的食谱。这是一个替代版本控制和部署策略,来自于 wp堆栈管理中的一个。 mc栈期望...
capistrano-puma, 面向 Capistrano的Puma集成 Capistrano::Puma安装将此行添加到你的应用程序的Gemfile中:gem 'capistrano3-puma', github:"seuros/capistrano-puma"或者:
roco, 通过ssh将应用程序部署到远程服务器,通过 Capistrano 启发灵感 Roco命令行 工具允许你在远程服务器或者本地执行命令。 用于部署,监视和其他任务。安装npm install roco -g用法roco deploy:setup # prepare ...
2. **自动化部署**:SSH可用于自动化部署流程,例如使用Jenkins或Capistrano等工具,通过SSH连接到服务器执行构建和部署命令,确保整个过程的安全性。 3. **远程服务器管理**:通过SSH,管理员可以远程执行Linux或...
$ cd my-capistrano-enabled-project$ cap production deploy当您运行cap ,Capistrano通过SSH忠实地连接到您的服务器,并执行部署项目所需的步骤。 您可以通过编写任务或使用Capistrano社区提供的预构建任务库来...
在当前版本目录中的远程主机上打开 SSH shell。 需要 Capistrano 3。 安装 将此行添加到应用程序的 Gemfile 中: gem 'capistrano-shell' 然后执行: $ bundle 或者自己安装: $ gem install capistrano-...
Github 支持 Capistrano 部署管理 UI。 Strano 允许用户通过一个简洁的 web 界面运行任何的 capistrano任务,能很简单的从你的任意 Github repositories 创建项目。Strano 能使用 Capistrano 配置它本身,也就是说...
capistrano-3-rails-template, 使用 Capistrano 3部署 Rails 应用程序的模板 Capistrano 3 Rails 配置概述这是部署带有的Ruby on Rails 应用程序的示例配置,包括使用Unicorn和Sidekiq后台员工部署的零停机。...
:cherry_blossom: Capistrano ::花见 v3的任务: cap deploy:migrate cap deploy:compile_assets 安装 将此行添加到您的应用程序的Gemfile中: group :development do gem 'capistrano' , '~> 3.7' gem '...
码头工人卡皮斯特拉诺使用 Docker 运行 Capistrano跑步 docker run -it --rm -v /home/john/.ssh:/root/.ssh -v /path/to/project:/source neolao/capistrano:3.4.0 cap --tasks
在IT行业中,自动化部署是提高效率的关键之一,而Ansistrano就是这样一个工具,它借鉴了Ruby的Capistrano工具的风格,为Ansible提供了一种简单、高效的部署解决方案。尤其适用于Python、PHP、Ruby等应用的部署场景。...
用Ruby编写的远程服务器自动化和部署工具。 Capistrano使用特定于在()服务器上运行命令的方法扩展了Rake DSL... 因此,您必须能够从部署系统到目标系统进行SSH(最好使用密钥和ssh-agent),Capistrano才能正常工作。
Capistrano插件,用于访问远程Redis服务器 安装 将此行添加到您的应用程序的Gemfile中: gem 'capistrano-redis' 然后执行: $ bundle 或将其自己安装为: $ gem install capistrano-redis 用法 在Capfile...