Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

can't open /dev/tty: No such device or address

3,349 views
Skip to first unread message

Ajay Gupta

unread,
Aug 10, 2011, 4:16:05 AM8/10/11
to
Hi,
I have AIX 5.2.0.0 server running. During sftp'ing i am getting the
FTP process has encountered error.

The log displays the below error.

Connecting to xxxxxxx.xxxxxxx.com...
OpenSSH_4.3p2, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Failed dlopen: /usr/krb5/lib/libkrb5.a(libkrb5.a.so):
0509-022 Cannot load module /usr/krb5/lib/libkrb5.a(libkrb5.a.so).
0509-026 System error: A file or directory in the path name
does not exist.

debug1: Error loading Kerberos, disabling Kerberos auth.
debug1: Connecting to dropbox.cingular.com [xxx.xxx.xxx.xxx] port xxx.
debug1: Connection established.
debug1: identity file /appl/dsl_batch/.ssh/id_rsa type 1
debug1: identity file /appl/dsl_batch/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version
OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH_3.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc 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: read_passphrase: can't open /dev/tty: No such device or
address
Host key verification failed.
Connection closed

But i am able to ftp the files manually using the same mechid.

Thanks in advance! :)

Lew Pitcher

unread,
Aug 13, 2011, 6:46:00 PM8/13/11
to
On Aug 10, 4:16 am, Ajay Gupta <ak.gupta...@gmail.com> wrote:
> Hi,
> I have AIX 5.2.0.0 server running. During sftp'ing i am getting the
> FTP process has encountered error.
>
> The log displays the below error.
>
> Connecting to xxxxxxx.xxxxxxx.com...
> OpenSSH_4.3p2, OpenSSL 0.9.7l 28 Sep 2006
[snip]

> debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
> debug1: read_passphrase: can't open /dev/tty: No such device or
> address
[snip]

>
> But i am able to ftp the files manually using the same mechid.

Processes that have controlling terminals are given a "shortcut" to
their terminal device via the /dev/tty device.

If a process /does not/ have a controlling terminal (such as the
situation with most daemon processes), then /dev/tty (for that
process) does not connect to anything, and an attempt to open it will
result in the "no such device" error.

You imply that your failing sftp is running via a daemon process. If
so, then it /wont/ have a /dev/tty, and sftp's attempt to open that
device will fail. Commands run from the commandline have the
commandline's terminal device as the controlling terminal, and thus /
those processes/ can access /dev/tty. This explains why your daemon-
spawned sftp fails while your manually-spawned sftp succeeds.

Find a way to tell your daemon-spawned sftp to /not/ open /dev/tty.
This should fix your problem.

0 new messages