public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] viewing consoles remotely
@ 2006-06-02  3:51 Iain Buchanan
  2006-06-02  4:26 ` Jeremy Olexa
  2006-06-02  4:57 ` Ryan Tandy
  0 siblings, 2 replies; 8+ messages in thread
From: Iain Buchanan @ 2006-06-02  3:51 UTC (permalink / raw
  To: gentoo-user

Hi all,

A gentoo box I have with some custom apps starts up and outputs messages
from each of these apps to the consoles (ctrl-alt-F1 to ctrl-alt-F6).

Is there any way of viewing this console output from a remote ssh
session, or something similar?

There used to be a program on QNX called ditto, which let you view and
control terminals remotely.  Kind of like vnc for text-consoles.

I am aware of screen, but AFAIK screen can't show the buffer locally on
the console as well as remotely to a user, at the same time...

thanks for the tips,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

The end of labor is to gain leisure.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] viewing consoles remotely
  2006-06-02  3:51 [gentoo-user] viewing consoles remotely Iain Buchanan
@ 2006-06-02  4:26 ` Jeremy Olexa
  2006-06-02  4:57 ` Ryan Tandy
  1 sibling, 0 replies; 8+ messages in thread
From: Jeremy Olexa @ 2006-06-02  4:26 UTC (permalink / raw
  To: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Iain Buchanan wrote:
> Hi all,
> 
> A gentoo box I have with some custom apps starts up and outputs messages
> from each of these apps to the consoles (ctrl-alt-F1 to ctrl-alt-F6).
> 
> Is there any way of viewing this console output from a remote ssh
> session, or something similar?
> 
> There used to be a program on QNX called ditto, which let you view and
> control terminals remotely.  Kind of like vnc for text-consoles.
> 
> I am aware of screen, but AFAIK screen can't show the buffer locally on
> the console as well as remotely to a user, at the same time...
> 
> thanks for the tips,

I am not quite sure if this would work but maybe "showconsole" is what
you are looking for?

% eix showconsole
* app-admin/showconsole
     Available versions:  1.07 ~1.08
     Installed:           none
     Homepage:            http://www.novell.com/linux/suse/
     Description:         small daemon for logging console output during
boot

I'm not sure if it will log messages after boot or not.

- --
Jeremy Olexa
(olexa@cs.umn.edu)
Office: EE/CS 1-201
CS/IT Systems Staff
University of Minnesota

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEf73mFN7pD9kMi/URAvesAJsHw9v2X3rXOgNAjQ48uY8AhcUcLwCdHJb+
Sxa2Saa1lIzMecoT2tMSHMU=
=xqjt
-----END PGP SIGNATURE-----
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] viewing consoles remotely
  2006-06-02  3:51 [gentoo-user] viewing consoles remotely Iain Buchanan
  2006-06-02  4:26 ` Jeremy Olexa
@ 2006-06-02  4:57 ` Ryan Tandy
  2006-06-03  8:04   ` Jure Varlec
  2006-06-09 21:34   ` Daevid Vincent
  1 sibling, 2 replies; 8+ messages in thread
From: Ryan Tandy @ 2006-06-02  4:57 UTC (permalink / raw
  To: gentoo-user

Iain Buchanan wrote:
> I am aware of screen, but AFAIK screen can't show the buffer locally on
> the console as well as remotely to a user, at the same time...
> 
> thanks for the tips,

# screen -x (name of screen)

Multi-user mode.  Only works as root, regardless of who started the screen.

For your situation, assuming I've interpreted it correctly, you should 
get the user to SSH into your box, set their shell in /etc/passwd to 
/usr/bin/screen -S (something memorable) /bin/bash, and yourself run 
sudo screen -x (something memorable) to view it.

Beware if you're trying to spy without being noticed: screen -x is 
interactive, so be careful what keys you hit.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] viewing consoles remotely
  2006-06-02  4:57 ` Ryan Tandy
@ 2006-06-03  8:04   ` Jure Varlec
  2006-06-03  8:43     ` Iain Buchanan
  2006-06-09 21:34   ` Daevid Vincent
  1 sibling, 1 reply; 8+ messages in thread
From: Jure Varlec @ 2006-06-03  8:04 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

On Friday 02 June 2006 06:57, Ryan Tandy wrote:
> Multi-user mode.  Only works as root, regardless of who started the screen.

AFAIK suid root is enough. Using it depends on your approach to security 
though :) .

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] viewing consoles remotely
  2006-06-03  8:04   ` Jure Varlec
@ 2006-06-03  8:43     ` Iain Buchanan
  2006-06-04  1:24       ` Ryan Tandy
  0 siblings, 1 reply; 8+ messages in thread
From: Iain Buchanan @ 2006-06-03  8:43 UTC (permalink / raw
  To: gentoo-user

On Sat, 2006-06-03 at 10:04 +0200, Jure Varlec wrote:
> On Friday 02 June 2006 06:57, Ryan Tandy wrote:
> > Multi-user mode.  Only works as root, regardless of who started the screen.
> 
> AFAIK suid root is enough. Using it depends on your approach to security 
> though :) .

Thanks for the tip, I didn't know screen could do that.  For those
interested, I had to:

1. sudo chmod u+s /usr/bin/screen
2. sudo chmod 755 /var/run/screen
3. screen -r sessionowner/[[pid.]tty[.host]]

and that's it!  I could use it as a simple "talk", and also to see what
was going on - great!
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Someday your prints will come.
		-- Kodak

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] viewing consoles remotely
  2006-06-03  8:43     ` Iain Buchanan
@ 2006-06-04  1:24       ` Ryan Tandy
  2006-06-04 11:29         ` Iain Buchanan
  0 siblings, 1 reply; 8+ messages in thread
From: Ryan Tandy @ 2006-06-04  1:24 UTC (permalink / raw
  To: gentoo-user

Iain Buchanan wrote:
> 1. sudo chmod u+s /usr/bin/screen
> 2. sudo chmod 755 /var/run/screen
> 3. screen -r sessionowner/[[pid.]tty[.host]]

I think the little part of me that's even slightly security-conscious 
just had a heart attack.

It's interesting that screen -r has the desired effect, though; I could 
have sworn screen -x was the only method that did the simultaneous-use 
thing.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] viewing consoles remotely
  2006-06-04  1:24       ` Ryan Tandy
@ 2006-06-04 11:29         ` Iain Buchanan
  0 siblings, 0 replies; 8+ messages in thread
From: Iain Buchanan @ 2006-06-04 11:29 UTC (permalink / raw
  To: gentoo-user

On Sat, 2006-06-03 at 18:24 -0700, Ryan Tandy wrote:
> Iain Buchanan wrote:
> > 1. sudo chmod u+s /usr/bin/screen
> > 2. sudo chmod 755 /var/run/screen
> > 3. screen -r sessionowner/[[pid.]tty[.host]]
> 
> I think the little part of me that's even slightly security-conscious 
> just had a heart attack.

Yeah, this means anyone with login access can view any screen on the
host.  However, I intend to get around this in a number of ways:

1. There are no real-life users on this machine - it just performs tasks
(not a good enough security by itself, I know).
2. Screens will be created with `screen -d -m blah` so when the blah
process dies, the screen will terminate, meaning someone watching won't
be left with root access.
3. Machines are remote, requiring dial up password, then ssh password,
without general world wide access.
4. Any more suggestions this list offers :)

> It's interesting that screen -r has the desired effect, though; I could 
> have sworn screen -x was the only method that did the simultaneous-use 
> thing.

Hmm, that's what the man page says about -x, but it says similar about
-r - note it only worked when I specified sessionowner/

thanks,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Women complain about sex more than men.  Their gripes fall into two
categories: (1) Not enough and (2) Too much.
		-- Ann Landers

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [gentoo-user] viewing consoles remotely
  2006-06-02  4:57 ` Ryan Tandy
  2006-06-03  8:04   ` Jure Varlec
@ 2006-06-09 21:34   ` Daevid Vincent
  1 sibling, 0 replies; 8+ messages in thread
From: Daevid Vincent @ 2006-06-09 21:34 UTC (permalink / raw
  To: gentoo-user

> -----Original Message-----
> From: Ryan Tandy [mailto:tarpman@gmail.com] 
> Sent: Thursday, June 01, 2006 9:58 PM
> 
> For your situation, assuming I've interpreted it correctly, 
> you should 
> get the user to SSH into your box, set their shell in /etc/passwd to 
> /usr/bin/screen -S (something memorable) /bin/bash, and yourself run 
> sudo screen -x (something memorable) to view it.

I tried this suggestion, but it didn't work. I couldn't login. :(

I would LOVE to make screen (and BASH) my default shell. I'm always ssh'ing
into my servers and getting upset if the connection goes down between me and
them, or I start an emerge and then forgot that I can't actually shut down
my host computer as that will kill the ssh and therefore the emerge.

I want screen to start up automatically as my default shell (as bash, with
all my .bashrc settings, etc) whenever I connect either via console or ssh.
I also would like to automatically re-attach to that screen whenever I login
again.

Is this possible? And if so, what do I need to put in /etc/password or
wherever. I could put it in a .bash* file, but that seems hackish (given the
idea in Ryan's quote above).

DÆVID  


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-06-09 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-02  3:51 [gentoo-user] viewing consoles remotely Iain Buchanan
2006-06-02  4:26 ` Jeremy Olexa
2006-06-02  4:57 ` Ryan Tandy
2006-06-03  8:04   ` Jure Varlec
2006-06-03  8:43     ` Iain Buchanan
2006-06-04  1:24       ` Ryan Tandy
2006-06-04 11:29         ` Iain Buchanan
2006-06-09 21:34   ` Daevid Vincent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox