Learn about Centmin Mod LEMP Stack today
Register Now

Sysadmin Paste into KVM

Discussion in 'System Administration' started by Jimmy, Jan 17, 2017.

  1. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:02 PM
    1.17.x
    MariaDB 10.3.x
    Wanted to post this as a future reference.

    Needed to login to a server via the hosts KVM feature. My password was very long and typing it out resulted in a timeout.

    Found information online about how to paste into a KVM. This tut is for Linux machines.

    If you are using linux on your workstation there is an OS setting that can allow for one-way paste.
    I am running Ubuntu 14.04, this is what I did:

    Code:
    sudo apt-get install xdotool xclip  
    2. Open up the Keyboard settings and click on shortcuts tab.
    3. Created new custom shortcut named "SendKeys" with this command:

    Code:
    sh -c 'sleep 1.0; xdotool type "$(xclip -o -selection clipboard)"'
    4. Assign Ctrl+Shift+B to the shorcut

    Now I can simply press Ctrl+Shift+B and the OS will type out whatever is on my clipboard.
    Don't hold Ctrl+Shift+B down longer than one second or unexpected things will happen (potentially causing harm), if this causes you issues increase the sleep time in the command.

    Credit:
    noVNC: copy paste not works
     
  2. eva2000

    eva2000 Administrator Staff Member

    44,785
    10,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,828
    Local Time:
    4:02 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    interesting depends on the the out of band console setup - some hosts have separate ip and port you connect to for the console i.e. Linode's Lish Using the Linode Shell (Lish) so can just use regular SSH client to log into console and have full cut and paste support.
     
  3. Jimmy

    Jimmy Well-Known Member

    1,704
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    2:02 PM
    1.17.x
    MariaDB 10.3.x
    The above is what I had to do for OVH.
     
  4. eva2000

    eva2000 Administrator Staff Member

    44,785
    10,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,828
    Local Time:
    4:02 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    handy to know :)