SSH & controlling tty

From: A.J (
Date: 11/21/02

From: "A.J" <>
Date: Thu, 21 Nov 2002 09:03:57 GMT


SunOS localhost 5.8 Generic_108528-17 sun4u sparc SUNW,Sun-Fire-280R

I'm using a perl program which uses IO::Pty for communicating with
ssh program like this:
open( 'ssh', -l test -A -x -i /tmp/sblast-ssh-home-29696/identity -e
none -o FallBackToRsh no -o NumberOfPasswordPrompts 1 -o
UserKnownHostsFile /tmp/sblast-ssh-home-29696/known_hosts -o
StrictHostKeyChecking no, )

What I want is the script to harness ssh to a pty and acting as a user
that I can type in phassphrase and password like a normal user. I cannot

use publickey in this case.

DISPLAY variable is set:
Warning: Identity file /tmp/sblast-ssh-home-29696/identity does not
Warning: Permanently added '' (DSA) to the list of known hosts.

ssh_askpass: exec(/usr/local/openssh/libexec/ssh-askpass): No such file
or directory

DISPLAY variable not set:
Warning: Identity file /tmp/sblast-ssh-home-29725/identity does not
Warning: Permanently added '' (DSA) to the list of known hosts.

Permission denied (publickey,password).

ssh -l test
test@'s password:
Authentication successful.
Last login: Thu Nov 21 2002 08:35:10 from localhost
No mail.

F-Secure SSH 2.4.0:
with DISPLAY variable set popups a passphrase window and after that
popups passwd window. Not wanted.
with DISPLAY variable not set:
You have no controlling tty and no DISPLAY. Cannot read passphrase.
warning: Authentication failed.
Disconnected; authentication cancelled by user (Authentication cancelled
by user.).

The question is: how do openssh and f-secure ssh figure out that the tty
in case
isn't a controlling tty? Is there any way to go round it, to make
underlying program
think that indeed it's a controlling tty?


Relevant Pages

  • Re: SSH Multiplexing w/ no controlling TTY
    ... My problem is that i can run the ssh command in the foreground, ... like being called w/o a controlling TTY and the disable psuedo tty option ...
  • Re: scp in non-interactive sessions problem?
    ... therefore in non-interactive mode. ... The problem is that ssh wants to read the password from its controlling ... You can either spawn ssh with a controlling tty from your app, ... Good judgement comes with experience. ...
  • Re: authentication failure log message
    ... > I've been working on a Perl script ... This happens when ssh has no controlling terminal or can't open /dev/tty ... using the "Expect" perl module to provide a controlling tty, ... Good judgement comes with experience. ...
  • F-Secure problem with system trying using pub/priv keys to authenticate back to itself
    ... Solaris 8 system running ssh: ... setup correctly for how F-secure wants them. ... warning: To enable, ... debug: hostname is ''. ...
  • Re: Too many open files
    ... On Sun, Mar 25, 2012 at 6:46 PM, Prabhpal S. Mavi ... have anyone has come across this warning / error? ... This occurs when i ssh ...