Wednesday, March 7, 2018

Linux container shell access issue: 
PTY allocation request failed on channel 0

The below details describe that how fix the guest linux container shell access issue.

Error Description:
While access the container using ssh or rlogin the PTY allocation get failes on channel 0.

root@10.xxx.xxx.xxx's password:
PTY allocation request failed on channel 0


Solution: 
1. Stop the container :
lxc-stop -n my-container

2. Edit the guest container config file:

~/config

add the following entry and save the config file:

lxc.pts = 1

3. Start the container:

lxc-start -n my-container -d


4. Login the container using ssh or rlogin and test it.

root@10.xxx.xxx.xxx's password:
#

All done....