Operating System - HP-UX
1835246 Members
2278 Online
110078 Solutions
New Discussion

ttytype: couldn't open /dev/tty for reading

 
yut
Advisor

ttytype: couldn't open /dev/tty for reading

guys,

I have an error when try to remote my server.
password:
ttytype: couldn't open /dev/tty for reading
stty: : Not a typewriter
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter

give a solution, please!

thx,

-yut-



4 REPLIES 4
Rajesh SB
Esteemed Contributor

Re: ttytype: couldn't open /dev/tty for reading

Hi,

Verify the permissions of /dev/*tty* files. Typically permissions will be Owner:bin Group: tty.

If any difference noticed, change the permissions and try out.

Typically If you use terminal setting command in the script, it returns warning like "stty:Not a typewriter", it is ignoreable.

Regards,
Rajesh
yut
Advisor

Re: ttytype: couldn't open /dev/tty for reading

thx for your reply,

file permission for tty files is true.
owner :bin , group : tty.
i can't connect to terminal.i try with xmanager and see syslog.log, below are errors in syslog.log:
Aug 23 15:48:08 abc sshd[12115]: Accepted keyboard-interactive/pam for yulianto from abc port 2632 ssh2
Aug 23 15:48:08 abc sshd[12115]: error: /dev/ptmx: Device busy
Aug 23 15:48:08 smsmt2 sshd[12118]: error: session_pty_req: session 0 alloc failed

yut
Advisor

Re: ttytype: couldn't open /dev/tty for reading

we can remote with telnet, but with ssh can't.
kernel configuration for tty:
npty 60
nstrpty 60
# ps -ef|grep tty |wc -l
3
# ps -ef|grep /dev/ptmx
root 14642 14609 0 17:29:07 pts/tp 0:00 grep /dev/ptmx
# ps -ef|grep ssh
root 13101 1 0 16:56:44 ? 0:00 /usr/sbin/sshd
apps 21771 21741 0 May 16 pts/9 0:00 ssh smsgw@10.1.105.43
prasz 14512 14510 0 17:22:49 ? 0:00 sshd: prasz@notty
root 14646 14609 1 17:29:25 pts/tp 0:00 grep ssh
root 14510 13101 0 17:22:49 ? 0:00 sshd: prasz [priv]

shouldbe i to add this parameter ??

yut
Advisor

Re: ttytype: couldn't open /dev/tty for reading

upgrade kernel configuration for pty (npty & nstrpty).

thanks for ypur reply,

-yut-