4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
page 1 / 1
2 results tagged On x
  • How to log history and logins from multiple ssh-keys under one user account | Screenage

    Une astuce utile pour faire un audit des connexions par clé sur un compte (quand on a plusieurs personnes avec des clés différentes qui accèdent au meme user)

    Implémentation rapide :

    !/bin/bash

    #On convertit le authorized_keys pour ajouter la variable d'env

    cp ~/.ssh/authorized_keyz ~/.ssh/authorized_keyz.ORIGINAL

    IFS=$'\n'
    for line in $(cat .ssh/authorized_keys)
    do
    comment=$(echo $line|cut -d' ' -f3)
    echo "environment=\"SSH_USER=$comment\" $line" >> ~/.ssh/authorized_keyz.COMMENT
    done

    cp ~/.ssh/authorized_keyz.COMMENT ~/.ssh/authorized_keyz

    Puis dans le bashrc de l'user, ajouter ça :

    if [ "$SSHUSER" != "" ]; then
    now=$(date +%Y-%m-%d
    %H-%M-%S)
    echo $now : User $SSH_USER logged in >> ~/ssh-audit.log
    fi

    14 mai 2014 à 17:22:59 UTC+2 - permalink - archive.org - http://www.screenage.de/blog/2012/02/10/how-to-log-history-and-logins-from-multiple-ssh-keys-under-one-user-account-with-puppet/
    audit ssh
  • Utilisation de Xen - Wikichris

    dd over ssh
    lvcreate vg00 -L 4G -n srv-test-disk #on choisi la même taille (4Go)
    mkfs.ext4 /dev/vg00/srv-test-disk
    ssh root@srv-xen.domain.com "dd if=/dev/vg00/srv-test-disk" | dd of=/dev/vg00/srv-test-disk

    ou avec gzip pour aller BEAUCOUP plus vite

    ssh root@srv-xen.domain.com "dd if=/dev/vg00/srv-test-disk | gzip" | gzip -dc | dd of=/dev/vg00/srv-test-disk

    23 mars 2014 à 08:52:57 UTC+1 - permalink - archive.org - http://wiki.gonzofamily.com/a/Utilisation_de_Xen#Snapshots
    dd lvm xen
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation