Forward keyboard and mouse over ssh
I have a PC that is connected to my TV. It does not have a mouse or keyboard, because I use SSH and my laptop. There is a program called x2x.
- First enable X11 forwarding on your server.(/etc/ssh/sshd_config)
- I use this script to connect, put it for example in /usr/bin, then you can simply use Run.
- This however does not ask for password, use .ssh/authorized_keys
#!/bin/sh ssh -YC HOSTNAME "x2x -big -label LABELNAME -to :0" &
If you look at the manual then you can use it also like a second monitor so that the mouse switches from screen edge. But i prefer clicking on the label.
If you want to connect a linux mashine and a windows to the same keyboard and mouse like they were one screen, then i suggest using TightVNC server on the windows machine and x2vnc on the linux box. Create an invitation from the windows box and run the command in linux.
#!/bin/sh x2vnc -west -listen