Access local console via SSH

You can read the text currently displayed on the screen from /dev/vcs. If your terminal window has the same number of columns as the actual screen output on the server, then you can simply type cat /dev/vcs and get a recognizable output.

You can append a number to access a specific console rather than always the active console. And you can use vcsa, if you want formatting information as well. So for example you can use /dev/vcsa1 to get the text on the first VC a long with formatting information.

Producing keyboard input is another matter. AFAIR the calls used by gpm only supports cut-n-paste, and doesn't allow arbitrary keystrokes to be input. A few searches on the net suggested it isn't supported out of the box, but it is possible to implement as a driver.


If it's an actual server, it will have out of band management (IPMI) features which will allow you to access the system console. For instance Dell servers call it iDRAC, HP servers have iLO, etc.

If your server has no such functionality then you can connect an IP KVM device to it.


I know this is an old question, but here's some insights :

  • Using "screen" is the way to go

  • start by typing screen

  • type your command

  • press CTRL+A d (to exit the screen)

  • this will detach the screen from your current session.

  • once you log back to your server, you can type : screen -ls to see the list of active screens

  • reattach the screen by using the command : screen -r <id of the screen>