[Lxc-users] lxc-console over ssh

Joerg Gollnick code4lxc+list at wurzelbenutzer.de
Wed Jul 27 20:28:19 UTC 2011


Hello John,
ssh has different (pseudo) terminal allocation if you execute a command.

Please use ssh -t to force pseudo-tty  allocation. 
ssh -t remote_host lxc-console -n vps_on_remote_host 

The other way around is to ssh remote_host and work with lxc-* as normal.
For lxc-start it is not very convenient, so I recommend to use the start 
sequence from some Archlinux start script screen -dmS init-vps_on_remote_host 
lxc-start -n vps_on_remote_host.

Best regards Jörg

On Wednesday 27 July 2011 21:12:36 John wrote:
> Hi, quick one that is puzzling me. Do the lxc commands work over ssh ?
> 
> I am trying to open a console on a remote host. I try this:
> 
> $ ssh remote_host lxc-console -n vps_on_remote_host
> 
> But I get an error:
> lxc-console: '0' is not a tty
> lxc-console: failed to setup tios
> 
> Other commands work fine like this
> 
> $ ssh remote_host lxc-ls
> 
> works fine.
> 
> $ ssh remote_host lxc-start -n vps_on_remote_host
> 
> also works fine but the output (boot messages) don't appear in the ssh
> session. The ssh session appears to hang until the container is closed down.
> 
> What am I missing?
> 
> In case you're wondering... I can't ssh vps_on_remote_host because it
> isn't set up. The remote_host is in another room making the ssh more
> convenient.
> 
> Thanks,
> John
> 
> 
> ----------------------------------------------------------------------------
> -- Got Input?   Slashdot Needs You.
> Take our quick survey online.  Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users




More information about the lxc-users mailing list