Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

April 14 2013

clone lvm via ssh

one just creates the targetlv in the same size as the srclv (8g in this case),
and when telling pv this size for the transfer it shows all the bells and
whistles it can .. even ETA :_)

dd if=/dev/srcvg/srclv | 
pv -p -e -t  -r -a -s 8G | 
ssh -i /home/user/.ssh/sshprivatekey -C -c arcfour -l root 172.x.y.z 'dd of=/dev/targetvg/targetlv'

April 10 2011

putty and ssh public key authentication

putty and ssh public key authentication

hardly ever did i bother to use putty as a normal terminal usually does what i want. unfortunately, there is an "operating system" whose name i will not mention that considers itself so different that the variety of available terminals for it is pretty low.

needing to tunnel an audio stream, i finally engaged in the quest for working ssh public key authentication using putty on such a system. needless to say, i read Chapter 8: Using public keys for SSH authentication and Chapter 9: Using Pageant for authentication of its documentation.

also needless to say, i couldn't have imagined how many pitfalls it contains. on unix, generating a key pair and sending the public key over is something that does not take more than a minute.

putty saved the generated keys somewhere, with the private key named .ppk and the public named whatever. it also offers to export something into openssh format which was what i wanted. i was nevertheless amazed that this file only contains the private key.

the public key that is needed to be put into server:.ssh/authorized_keys looked like some other rsa key that are used for ssl certificates but not very much like the keys that are normally stored in .ssh/authorized_keys. there is something that will output this format that i found on unix but not yet on other platforms, -O public-openssh.


edit a copy of this public key file with a text editor, delete all the boilerplate stuff, write ssh-rsa / ssh-dsa on the beginning of the line with the actual key, join all further lines of it to just one, append something like user@host at the end and delete all the rest. the file is now ready to be appended to the other keys in authorized_keys.

the documentation on puttygen on unix has options to directly output this format using -O public-openssh . in this case i did it manually, from this:

Comment: "rsa-key-20110410"

into this:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqW/3hc9LgrNfYHFdBU37AM45s0OLfDJ1isvhV5Ug4h0d/YzY8uzjRcZU5FrUz3NAsLlkgZck7M3Dg61/6oSZRDYAOZwsWJWhv+bxuBY6Y2JEiFTZP1vIJoaj2v3nJz07w5n6ZtueCtodUWLi8MHotC6+zsXEmCbhI1RR7u/8ork= user@host


start pageant. i will hang out in the system tray and yes, private keys can be read into it and decrypted at which point it workedforme(tm).

June 27 2010

lucid and ssh-agent

for ages, i had my ssh-agent settings in my .bashrc. with lucid this setup stopped working.

i had to - tell gconftool to not intermingle:

gconftool-2 --set -t bool /apps/gnome-keyring/daemon-components/ssh false

which did not do much. as an ugly hack, i additionally just disabled my own ssh-agent handling if it runs on lucid:
    # ssh-agent stuff
    # broken with ubuntu lucid
    distro=lsb_release -c | sed -e 's/Codename://g' | grep lucid
    if [ ! -z "$distro" ] ; then
                #echo "$distro detected, aborting ssh-agent logic"
                echo $- | grep i > /dev/null
                if [ "$noninteractive" == 0 ] ; then
                    ssh-add -l >& /dev/null
                    if test $? = 2; then
                         if test -f ~/.agent; then
                                 . ~/.agent
                         ssh-add -l >& /dev/null
                         if test $? = 2; then
                                 ssh-agent > ~/.agent
                                 . ~/.agent > /dev/null


Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!