How do you copy from tmux (copy mode) running on a remote ssh connection to your local clipboard

浪尽此生 提交于 2019-12-05 10:52:36

This needs integrating tmux buffers with OSX clipboard. What you are trying to do with ssh host pbcopy is just that but I don't think your setup is correct.

host here should be your local OSX machine. And you should have password less key-based trust established between your OSX username and remote user where you are running tmux.

Step 1. Enable SSH on your OSX Goto System preferences -> Sharing and enable Remote Login. Also remove administrators from the list and add your username.

Step 2. Setup password less login.
These are the steps

Step 3. Replace your host with 192.x.x.x or whatever your OSX's ipaddress is which is reachable from your Virtualbox

I know this question is answered, but just want to provide an alternative solution;

copy text in tmux copy mode from remote host to local system was always a pain for me, I use a windows laptop to SSH into remote system a lot, but apparently there was no good way to do the remote copy, specially when you have more than one screen of text to copy...

so I wrote a tool: rclip, which uses tmux's copy-pipe command to pipe copied text to rclip, and rclip will forward text over network to a rclip process running on local system, which will copy the received text to system clipboard; all communication is authenticated and encrypted via TLS; give it a try, I am quite happy with it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!