Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
This isn't a question on how to use a client like PuTTY to access a terminal session over SSH. What I am looking for is a software solution which, once the boot process is complete, "forks" the primary console input and output to a remote terminal program over a defined port, while allowing the primary console to be active simultaneously - similar to a remote control program for That Other Operating System (I notice the forum rules prohibit the mention of the name here :-)) Why do I need it? Well, if you use PuTTY to connect to a console session, and start a program running, if the ssh connection fails, the console session dies and kills the program. Also, no one at the physical console can see what you are doing. I need to find a way to keep a persistent session mirroring the physical console, and re-connect to it if the connection fails. There is a lot of stuff on the internet on (perhaps) how to do it over a COM port connected to KVM hardware, but almost nothing about how to do it over a port. Is this even possible? I use a Centos-based distribution. Any pointers would be gratefully appreciated.
The usage of the serial interface as console is still the best route to take.
A single port terminal server that supports SSH will do.
The remote SSH session will be between your remote client and the terminal server, so if the session is dropped it will not affect the Linux serial console session. Also you get the added benefit of the boot messages, and not having to rely on other process's to obtain remote access.
[my company sells these ... so I am a little biased]
If you connect directly to the Linux host via an SSH client, you can use a utility such as "screen" to create a shell that you can detach from to have an app running if you disconnect.
One program name: GNU screen. http://www.gnu.org/software/screen/ . yum -v install screen . Useful switches: -U (Unicode support, if you use UTF-8 locale), -R (reattach), -x (reattach without kicking previous user - share a session). Useful key combination: "Ctrl-a d" - disconnect that instance of screen from the (possibly shared) session.
I am working on a embedded linux project and facing an issue in identifying the ssh port number from a ssh client.
The entire approach is in this way, The SSH Client Module is started up by the Operating System’s SSH daemon when a ssh user login remotely and It’s standard input and output is redirected through the SSH encryption module.
So using some system calls supported by linux OS I need to convert this standard input and output to a valid descriptor and get the ssh port number on which the user has connected.