News for hackers. Stuff that matters.
Re:sshrc – make your ssh sessions feel like home by Russell91 on Saturday September 20, 2014 @03:08AM (#8343911)
np. The funny thing is that sshrc is just a bash script, so it really could have come about 10 years ago. All it took was a few weeks of unemployment and refusal to believe that it couldn't be done. For those of you that opt out of reading the source but are curious as to how it works internally: the tool zips all your files, dumps them as hex code, and stuffs them into an argument string for the little known ssh -t option, which carries instructions to undo the whole process on the server side. As a side note, stuffing a linux filesystem into an argument string is the reason why your ~/.sshrc.d can be much bigger than a megabyte - bash doesn't like processing commands that are that long.
Re:sshrc – make your ssh sessions feel like home by equoid on Sunday September 21, 2014 @05:51AM (#8346744)
But ssh -t forces pseudo-tty allocation and doesn't take arguments, what you are doing is appending command strings to the ssh command line.
Re:sshrc – make your ssh sessions feel like home by Russell91 on Sunday September 21, 2014 @04:34PM (#8348191)
you're right, this is a better way of thinking about it.
Re:sshrc – make your ssh sessions feel like home by ta0967 on Sunday September 21, 2014 @03:41AM (#8346600)
the little known ssh -t option is not documented to take an argument, i'm not sure this works the way you think it does.
Re:sshrc – make your ssh sessions feel like home by beerbajay on Saturday September 20, 2014 @03:13AM (#8343918)
Couldn't the 1MB limit be bypassed by invoking scp to transfer the files?
Re:sshrc – make your ssh sessions feel like home by Russell91 on Saturday September 20, 2014 @03:25AM (#8343937)
yes, but using a separate scp command requires a second round trip and second password/key authentication, which would double the wait time of the already slow ssh login process.
Re:sshrc – make your ssh sessions feel like home by dnet on Saturday September 20, 2014 @05:01AM (#8344068)
not, if you configure multiplexing (and why wouldn't you) https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing
Re:sshrc – make your ssh sessions feel like home by JoachimSchipper on Saturday September 20, 2014 @06:15AM (#8344177)
As an inferior option for older OpenSSH versions, you could also forward a port and send the tarball over that.

If people regularly send large directories, you might also want to extend this with rsync.

Re:sshrc – make your ssh sessions feel like home by mixmastamyk on Saturday September 20, 2014 @03:42AM (#8343962)
Interesting, I wonder if python fabric or its ssh libs could help.