Artur Bergman (crucially) wrote,
Artur Bergman
crucially

  • Mood:
Because you like moving your laptop around without loosing your screens.

#! /bin/bash

while [ 1 ]; do
    ssh -A -o ServerAliveInterval=5 -o ConnectTimeout=5 $1 -t \
    "ln -sf \$SSH_AUTH_SOCK ~/.ssh/agent_sock; SSH_AUTH_SOCK=~/.ssh/agent_sock; export SSH_AUTH_SOCK; screen -DR $2"
    reset
done


I call mine bin/pssh and invokte it as

pssh host screename

thanks to matthew for ssh agent trick!
Tags: hacking
Subscribe

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments