?

Log in

No account? Create an account
Because you like moving your laptop around without loosing your… - Artur Bergman [entries|archive|friends|userinfo]
Artur Bergman

[ website | O'Reilly Radar ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Aug. 9th, 2006|07:01 pm]
Artur Bergman
[Tags|]
[Current Mood |amusedamused]

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!
LinkReply