Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a logitech wireless keyboard/mouse, but just lost the tiny usb wireless receiver.

I want to use my laptop as the keyboard for the other machine (Ubuntu 10.10) until I replace the keyboard and mouse.

Is it possible to control the console session's keyboard over ssh? I only want keyboard control, I don't want to use something like VNC because the video is too slow.

EDIT: I'd like to be clear that I want to be able to control gui applications running on the console session, so something like gnu screen won't (as far as I know) help with that.

share|improve this question

migrated from stackoverflow.com Aug 13 '11 at 11:13

This question came from our site for professional and enthusiast programmers.

up vote 7 down vote accepted

x2x does exactly what you want:

$ ssh -X othermachine x2x -west -to :0

Now you can move your mouse to the left of your laptop and it wii appear in that other machine. Keyboard 'goes' there too.

You'll need to enable X forwarding in that other machine's sshd.

share|improve this answer
    
Read more about x2x here: linux.com/archive/feature/148824 – holygeek Aug 13 '11 at 8:25
    
Holy bajeebus. I now have a remote for my glorified netflix-player. – OneChillDude Jun 4 '13 at 6:02
    
I can control the pointer on the remote machine (Raspberry Pi) but the keyboard stops working. I posted another question about it: superuser.com/questions/648291/… – Macario Sep 21 '13 at 1:30
    
Awesome. I can see some glitches though: Selecting some text isn't persistent. I can't cut and paste, for example. Is this something known? – Nikos Alexandris Sep 25 '14 at 9:57

Synergy is a client/server application so you can share the keyboard+mouse on one (the server) with multiple other desktops (clients). I've used it for years and it's fairly easy to configure.

share|improve this answer

Use something like tmux or screen. These programs will start a console session that can be attached to from any ssh connection or local terminal. Additionally, they let you open multiple console sessions inside the same parent screen/tmux session, allowing you to interact with multiple shells and console programs over a single connection.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .