[Lxc-users] ssh'ing in the container ( ioctl operation not permitted /dev/tty failed - no such device or address )

swair shah swairshah at gmail.com
Mon Oct 22 10:34:09 UTC 2012


On Mon, Oct 22, 2012 at 3:56 PM, swair shah <swairshah at gmail.com> wrote:

>
>
> On Mon, Oct 22, 2012 at 3:49 PM, Fajar A. Nugraha <list at fajar.net> wrote:
>
>> On Mon, Oct 22, 2012 at 5:11 PM, swair shah <swairshah at gmail.com> wrote:
>> > I have a container running centos 6, on a host system also running
>> centos 6.
>> > I have allocated a different subnet for containers and I'm able to ping
>> the
>> > container.
>> >
>> > Now when I try to ssh into the container from another console, it
>> prompts me
>> > for password. This is the log on the host system.
>> >
>> > Oct 22 14:00:25 localhost sshd[264]: Accepted password for root from
>> > 192.168.0.2 port 38355 ssh2
>> > Oct 22 14:00:25 localhost sshd[264]: pam_unix(sshd:session): session
>> opened
>> > for user root by (uid=0)
>> > Oct 22 14:00:25 localhost sshd[266]: error: ioctl(TIOCSCTTY): Operation
>> not
>> > permitted
>> > Oct 22 14:00:25 localhost sshd[266]: error: open /dev/tty failed -
>> could not
>> > set controlling tty: No such device or address
>>
>> That's odd. My centos container has no /dev/tty and it works just
>> fine. My host has one though.
>>
>> >
>> > I should also mention that my host machine is a remote one and I have
>> ssh'd
>> > into that.
>>
>> It shouldn't matter.
>
>
>> >
>> > Do I need to make any specific changes to the tty conf in the container?
>>
>> Do you have /dev/pts directory inside the container? What files are in
>> there?
>>
>
> /dev/pts has
>
> crw--w---- 1 root    tty  136, 0 Oct 22 15:54 0
> crw--w---- 1 swair  tty  136, 7 Oct 22 15:52 7
> c--------- 1 root    root   5, 2 Oct 22 15:25 ptmx
>
>
>> Do you have /dev/tty inside the host?
>>
>
> Host has /dev/tty.
>
>
> swair.
>

Oh sorry. /dev/pts contains these

crw--w---- 1  500 tty  136,  0 Oct 22 14:30 0
crw--w---- 1  500 tty  136,  1 Oct 22 14:32 1
crw--w---- 1 root tty  136, 10 Oct 22 14:32 10
crw--w---- 1 root tty  136, 11 Oct 22 14:32 11
crw-rw-rw- 1 root tty  136, 12 Oct 22 14:32 12
crw--w---- 1 root tty  136,  2 Oct 22 14:30 2
crw--w---- 1 root tty  136,  3 Oct 22 14:30 3
crw--w---- 1 root tty  136,  4 Oct 22 14:30 4
crw--w---- 1 root tty  136,  5 Oct 22 14:30 5
crw--w---- 1 root tty  136,  6 Oct 22 14:33 6
crw--w---- 1  500 tty  136,  7 Oct 22 14:31 7
crw--w---- 1 root tty  136,  8 Oct 22 14:32 8
crw--w---- 1 root tty  136,  9 Oct 22 14:32 9
c--------- 1 root root   5,  2 Oct 22 14:29 ptmx



swair
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20121022/86e43158/attachment.html>


More information about the lxc-users mailing list