Operating System - HP-UX
1753519 Members
6126 Online
108795 Solutions
New Discussion юеВ

Re: tty errors while trying to login to the server

 
Venkat_11
Regular Advisor

tty errors while trying to login to the server

Here are the errors we getting when we tried to login to server using ssh.

ttytype: couldn't open /dev/tty for reading
stty: : Not a typewriter

But luckyly we have one active session on the server which we are trying to use to trouble shoot the issue. Here are the some of the parameters related to pts session on the server.

# kmtune -q nstrpty
Parameter Current Dyn Planned Module Version
===============================================================================
nstrpty 200 - 200

# ls /dev/pts | egrep -i '^[0-9]' | wc -w
60

# kmtune -q npty
Parameter Current Dyn Planned Module Version
===============================================================================
npty 200 - 200

# ps -ef | grep pty | wc -l
2

Can anybody help resolving this issue? Please let me know if you need more details regarding this concern.

Thanks and Regards
Venkat
9 REPLIES 9
щ╗ЮчЗГ
Valued Contributor

Re: tty errors while trying to login to the server

Asif Sharif
Honored Contributor

Re: tty errors while trying to login to the server

new2008
Advisor

Re: tty errors while trying to login to the server

Hello,

We checked the permissions of /dev/tty's and /dev/pty's. It is Owner:bin and Group:tty. Also copied the /etc/profile from another server. Still we are getting the below error.

"Server refused to allocate pty
Not a terminal
stty: : Not a typewriter"

Regards

new2008
Advisor

Re: tty errors while trying to login to the server

Hi,

Could anyone hlep us resolve this issue. Any other solutions.

Regards
avizen9
Esteemed Contributor

Re: tty errors while trying to login to the server

/dev/tty is charactor device file, it should have below permission /user/group please compare with it.

crw-rw-rw- 1 bin bin 207 0x000000 Feb 21 10:57 tty

also is it possible for you to copy this device file from any other working server which having same version of os, you should copy it with tar. (do tar and then do ftp over and then un-tar)

have you tried to run insf -e (this will create device file if it had deleted.)


also can you post bdf -l output,
let me know, thanks.

Laurent Menase
Honored Contributor

Re: tty errors while trying to login to the server

it is because if you use ssh to run a remote command (or with -T option), and in that case, there is no tty of control associated with your session.


so use ssh -t

# ssh -t hpfrcs24 tty
/dev/pts/0
# ssh hpfrcs24 tty
not a tty
new2008
Advisor

Re: tty errors while trying to login to the server

Hello

When i use ssh -t sername tty i get message as "not a tty"


Regards
Steven E. Protter
Exalted Contributor

Re: tty errors while trying to login to the server

Shalom,

I suggest removing and rebuilding the tty device files.

rm them.

insf -e

# rebuilds them properly.

Not a typewriter may be an environment problem not a problem with the device files themselves.

Oracle commonly does this when it shells out because the Oracle OS shell contains no environment at all.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Laurent Menase
Honored Contributor

Re: tty errors while trying to login to the server

did you look at syslog?

you can also start sshd in debug mode.