RE: [gentoo-user] viewing consoles remotely

2006-06-09 Thread Daevid Vincent
 -Original Message-
 From: Ryan Tandy [mailto:[EMAIL PROTECTED] 
 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



Re: [gentoo-user] viewing consoles remotely

2006-06-04 Thread Iain Buchanan
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



Re: [gentoo-user] viewing consoles remotely

2006-06-03 Thread Jure Varlec
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 :) .


pgpscL0Ui4GUP.pgp
Description: PGP signature


Re: [gentoo-user] viewing consoles remotely

2006-06-03 Thread Iain Buchanan
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



Re: [gentoo-user] viewing consoles remotely

2006-06-03 Thread Ryan Tandy

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



[gentoo-user] viewing consoles remotely

2006-06-01 Thread Iain Buchanan
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



Re: [gentoo-user] viewing consoles remotely

2006-06-01 Thread Jeremy Olexa
-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
([EMAIL PROTECTED])
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



Re: [gentoo-user] viewing consoles remotely

2006-06-01 Thread Ryan Tandy

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