本博客文章已转移到独立博客,请点击做最好的三三查看全文。
10
5
2012
3

连接ssh出现Permission denied之一解

本博客文章已转移到独立博客,查看本文请点击做最好的三三查看全文。

问题描述:

在一台centos 6.0的vps上使用ssh无论连接什么样的主机都连接不上,提示信息为:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

排除了防火墙等原因,百思不得其解。后来在man ssh里面发现了一个参数-v

     -v      Verbose mode.  Causes ssh to print debugging messages about its
             progress.  This is helpful in debugging connection, authentica‐
             tion, and configuration problems.  Multiple -v options increase
             the verbosity.  The maximum is 3.

于是使用ssh -v localhost试图连接。在debug信息里面发现一条很奇怪的信息,如下:

debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such file or directory

尝试使用password模式时,没办法调用read_passphrase来获取密码。提示/dev/tty这个文件缺失。

于是在本地的cygwin(我是win环境)下用ls -l /dev/tty得到以下信息:

crw-rw-rw- 1 oott123 None 5, 0 十月  5 14:53 /dev/tty

使用mknod /dev/tty c 5 0来创建一个新的设备文件,故障解除。

后来##Orz的atmouse发现了这个页面,和我遇到的问题一模一样:【这里】,解决方式也是一样的。

本博客内容除标明外均为原创;转载请保留原文地址或pingback;所有代码所有权归作者所有;在此公布的所有作者标明为本人的代码均可非商业自由使用。
本博客文章已转移到独立博客,发表评论请点击做最好的三三查看全文。
Category: Linux笔记 | Tags: linux ssh /dev/tty | Read Count: 4615
Avatar_small
依云 说:
Oct 05, 2012 05:21:05 PM

atmouse? 好像在 archlinux-cn 里见到过呢。

Avatar_small
三三 说:
Oct 06, 2012 07:24:32 PM

是的呢 就是那个atmouse~

StarBrilliant 说:
Dec 27, 2012 12:39:00 PM

帮我做我的 IRC ##Orz 频道的广告,你真是太好了!


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com

Power by Chito 1.3.1 beta

| Theme: Aeros 2.0 by TheBuckmaker.com