Join the community today
Become a Member

Sysadmin Paste into KVM

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

  1. Jimmy

    Jimmy Premium Member Premium Member

    1,025
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    1:18 AM
    1.13.x
    MariaDB 10.1.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
     
    • Informative Informative x 1
  2. eva2000

    eva2000 Administrator Staff Member

    28,968
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,758
    Local Time:
    3:18 PM
    Nginx 1.13.x
    MariaDB 5.5
    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.
     
    • Informative Informative x 1
  3. Jimmy

    Jimmy Premium Member Premium Member

    1,025
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    1:18 AM
    1.13.x
    MariaDB 10.1.x
    The above is what I had to do for OVH.
     
    • Informative Informative x 1
  4. eva2000

    eva2000 Administrator Staff Member

    28,968
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,758
    Local Time:
    3:18 PM
    Nginx 1.13.x
    MariaDB 5.5
    handy to know :)