LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-26-2003, 04:21 PM   #1
jesters
LQ Newbie
 
Registered: Nov 2003
Posts: 2

Rep: Reputation: 0
Question Is there a way to access to the main consoles thru a SSH or Telnet session ?


It might be due to the fact that I am used to the ditto tool of QNX.
I am wondering if there is a tool that would allow me once in a SSH or Telnet session to have access to the TTY1 or TTY2 or TTY3 consoles.

I already found that VNC allows me to remote access to the X terminal but that is not what I am looking for. Since I control foreground programs running on the main TTY and that I do not use the X environment.

It might be very obvious to some of you but I am really a at This.
Thanks..
 
Old 11-26-2003, 04:50 PM   #2
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
I don't really understand your question.

"Since I control foreground programs running on the main TTY and that I do not use the X environment." Please rephrase this.

SSH will give you a terminal just like TTY1,TTY2,etc. From there you can control any job.

If you mean you want to 'take over' what would be running on TTY1 if you were sitting at the computer, maybe you should look into running 'screen.' Screen allows you to detach terminal sessions (whatever jobs are running in that terminal) and attach them to other sessions. Type man screen at the command prompt.

Try to explain more precisely what it is you need to do.

Last edited by mac_phil; 11-26-2003 at 04:52 PM.
 
Old 11-27-2003, 03:33 PM   #3
jesters
LQ Newbie
 
Registered: Nov 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Hello mac_phil
Thanks for your reply.

When I connect via a remote session ( telnet, ssh, )
I get the terminal "/dev/pts/0" from There, what I am trying to do is to have control over a specific TTY such as /dev/tty1 /dev/tty2, etc...

The screen command you are suggesting is interesting and seems very near from what I am looking for. So far I tried reading a lot but did not find a way to even see what is going on the /dev/tty1. I might just not know how to do it using the screen command so far

And getting control over a task running at another terminal is not what I am looking for because The program running at /dev/tty1 for example generates output at that terminal, which I want to see. Also I want to be able to stop the command and start it back at that same terminal. And I need to do so because it is not a daemon or a program that I want to run in background, and I do not want it to be killed once I exit my remote session.

Thank you for your interest in my problem so far
 
Old 11-27-2003, 10:18 PM   #4
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
Right, sounds like you want screen. Whatever is outputting to tty1 should be run under screen. Then you can detach the screen session and later attach it to any ssh or tty* session. Now this valuable output is sent to a job which is not tied to any terminal.

Google for 'screen user's manual.' Read it all. You need to figure out how to run this program under screen, detach it, and attach it. I don't use that functionality of screen but you'll figure it out.

Think about screen as a full screen window manager for the command line. Only the whole window manager session can be made to disappear visually while it continues to run. Then the whole window manager session can be viewed later from any shell.

Basic intro:
screen - start screen(basically just gives you a shell)
ctrl-a - prefix for most screen commands
ctrl-a c - open a new shell/window
ctrl-a " - see list of shell windows(numbered)

Last edited by mac_phil; 11-27-2003 at 10:44 PM.
 
Old 11-28-2003, 05:36 PM   #5
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
OK I had a minute to play with screen and here is how you do it.

Shut down whatever is generating that output.
<screen> - starts screen
<command-to-start-that-program> - start generating output
CTRL-a d - detach session

Then, when you want to look at that output via ssh or whatever
<screen -r> - reattach session
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
only FTP access to user not ssh or telnet farhank Linux - Security 3 10-27-2005 09:30 AM
If I switch virtual consoles, my x session is lost K2712 Ubuntu 2 06-07-2005 05:03 PM
can't see virtual consoles from/after X session cyberphiliac Linux - Newbie 2 04-06-2005 04:49 PM
Customizing SSH/TELNET session jon_k Linux - General 2 05-15-2004 12:41 PM
Telnet/SSH screen stops responding after a while but the session is still active alllle Linux - Networking 4 05-04-2004 12:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration