The usual workflow to connect to a remote machine is as follows:

  1. Log into local machine
  2. Fire up a terminal window
  3. Type "ssh user@r.lan"
  4. Log into remote machine

I want to get rid of the local Log-in, and compress this into a single step. Like a VT220 terminal would do. Intended workflow:

  1. Boot the terminal machine (text mode)
  2. The user presented with a tty with login prompt on
  3. User types in it's credentials
  4. The credentials are verified on a remote machine (r.lan)
  5. The user drops into a shell the remote machine (r.lan)

Context: I am designing a simple terminal application, that I want some customers to use. The application should be run from dedicated terminals with minimal hardware. If I run the application locally, I can just change the login shell to point to the application and get the desired workflow (user-auth then directly drop into the app). However, I want this application to reside on a server, and not have the user explicitly interact with the local machine and ssh.

  • It is possible to replace the TTY prompt by a script , which in your case, would issue the SSH command directly,
    – xenoid
    Oct 14, 2018 at 22:06
  • It sounds like you are looking for a "Thin Client" architecture... ltsp is included in the repos of several common distros. Oct 14, 2018 at 23:07
  • @RubberStamp LTSP looks close, but it looks like they are focusing on GUI applications. Do you know if they support text sessions as well? Oct 15, 2018 at 12:25

1 Answer 1


Back when I was studying in an University of Technology (in 1997 or so), the local student guild received some old VT220 terminals and low-spec PCs (think Intel 20 MHz 386 CPUs) as a donation (from the uni's computing centre, I think). The guildroom already had a PC or two that could run a web browser, but the most needed service among the students was just a SSH connection that could be used to read email and use the (text-based) course enrollment system.

I wired up the terminals to the PCs, configured the getty processes to show a hostname: prompt instead of the usual login:. Then I took the source code of /bin/login and made a modified version of it.

That program would accept the hostname entered for getty as a command line parameter (just like username would normally be), then prompt for an actual username, and then exec() a SSH command for the desired remote host. When the SSH command exited, the entire "login session" would die and the process would automatically start over as init would re-start getty.

The same configuration could be used both on a local console and on a serial terminal connection. Now each of those old PCs could be made to serve as a multi-seat SSH kiosk!

You could do something similar, but even simpler as you would not need the hostname prompting step. Your modified /bin/login would just need to accept the already-typed username and launch a SSH connction to a specific remote machine. The SSH client would then show a password prompt.

  • Thanks for this. Very cool project. This looks like a viable path! I still have hopes there is an off-the-shelf solution for this problem, so I'll keep the question open for now. Oct 15, 2018 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.