4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
◄Older
page 3 / 4
Newer►
69 results tagged ssh x
  • Things I've found useful » Blog Archive » Bash SSH known_hosts tab completion

    This morning a discussion with a friend about various shells lead me to think it would be nice if my bash shell could tab complete hostnames from .ssh/known_hosts when I type ‘ssh <tab>’. I soon found this blog post which nicely documents how to do it. I made a directory in $HOME called .bash.completion and then added this to my .profile, which loops round any files in there, sourcing them individually:

    if [ -d ${HOME}/.bash.completion ]; then
    for file in ${HOME}/.bash.completion/* ; do
    source $file
    done
    fi

    All sorted. However, it wasn’t long before I discovered that ‘ssh user@<tab>’ doesnt work, I tend to use this quite a lot so wanted to see if I could fix up the bash function to support that use case. Bit of hacking around and I’ve got it working, the replacement ssh-completion file is shown below:

    Add bash completion for ssh: it tries to complete the host to which you

    want to connect from the list of the ones contained in ~/.ssh/known_hosts

    __ssh_known_hosts() {
    if [[ -f ~/.ssh/known_hosts ]]; then
    cut -d " " -f1 ~/.ssh/known_hosts | cut -d "," -f1
    fi
    }
    _ssh() {
    local cur known_hosts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    known_hosts="$(__ssh_known_hosts)"
    if [[ ! ${cur} == - ]] ; then
    if [[ ${cur} ==
    @ ]] ; then
    COMPREPLY=( $(compgen -W "${known_hosts}" -P ${cur/@
    /}@ -- ${cur/*@/}) )
    else
    COMPREPLY=( $(compgen -W "${known_hosts}" -- ${cur}) )
    fi
    fi
    return 0
    }
    complete -o bashdefault -o default -o nospace -F _ssh ssh 2>/dev/null \
    || complete -o default -o nospace -F _ssh ssh

    May 26, 2014 at 10:06:39 AM GMT+2 - permalink - archive.org - http://usefulthings.org.uk/2013/04/bash-ssh-known_hosts-tab-completion/
    autocomplete ssh
  • 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

    May 14, 2014 at 5:22:59 PM GMT+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
  • Twitter / climagic: Confuse people SSHing to your host with a redirect back to theirs - @jeekajoo ~/µblog https://fralef.me/links/?eGhuHQ

    Ahah a tester

    April 8, 2014 at 10:32:44 PM GMT+2 - permalink - archive.org - http://Twitter / climagic: Confuse people SSHing to your host with a redirect back to theirs - @jeekajoo ~/µblog https://fralef.me/links/?eGhuHQ
    ssh
  • AuthorizedKeysCommand : quand OpenSSH devient CloudSSH. Nan j'déconne. / GLMF-161 / GNU/Linux Magazine / Connect - Edition Diamond

    alternatives à authorized_keys

    via Skunnyk

    March 31, 2014 at 11:19:48 AM GMT+2 - permalink - archive.org - http://connect.ed-diamond.com/GNU-Linux-Magazine/GLMF-161/AuthorizedKeysCommand-quand-OpenSSH-devient-CloudSSH.-Nan-j-deconne
    ssh sys
  • Execute local script remotly and get ouput into a local log file

    Cool stuff :

    ssh user@server 'bash -s' < local_script.sh > local_script.log 2>&1

    January 31, 2014 at 3:53:51 PM GMT+1 - permalink - archive.org - https://links.infomee.fr/?ORnmyQ
    bash ssh
  • OpenSSH Tip: Check Syntax Errors before Restarting Server

    not bad
    $ sudo /usr/sbin/sshd -t
    $ echo $?

    January 8, 2014 at 4:14:58 PM GMT+1 - permalink - archive.org - http://www.cyberciti.biz/tips/checking-openssh-sshd-configuration-syntax-errors.html
    check config server ssh
  • Mosh: the mobile shell
    January 6, 2014 at 6:24:34 PM GMT+1 - permalink - archive.org - http://mosh.mit.edu/
    mobile serveur ssh
  • How to tunnel everything through SSH - fooninja.net

    In Firefox, the solution is easy. Simply type about:config in the address bar and set network.proxy.socks_remote_dns to true. This will have the remote end (i.e., the machine you are SSH’ing to) handle the DNS lookups.

    October 20, 2013 at 8:16:44 PM GMT+2 - permalink - archive.org - http://fooninja.net/2010/09/06/how-to-tunnel-everything-through-ssh/
    dns lookup ssh tunnel
  • Portknocking in bash

    Un serveur, mais surtout un client pour faire du port knocking

    October 15, 2013 at 10:32:22 AM GMT+2 - permalink - archive.org - http://www.prometheus-group.com/labs/unbounded/46-web-security/135-bash-pk.html
    bash knocking port portknocking serveur ssh
  • ssh config file : proxy

    Pour utiliser machinerebond pour accéder aux *.vm automatiquement :

    $ cat .ssh/config
    Host=machinerebond
    Hostname=machinerebond.fqdn.com
    User=root

    Host=*.distant
    User=root
    ProxyCommand=ssh -W %h:22 machinerebond

    Alternative :
    D'abord se co sur la machine rebond avec un -A pour ramener sa key dans l'agent distant
    Ensuite on peut se co sur les autres machines, mais plus long.

    Autres directives possibles :
    ServerAliveInterval 30
    ServerAliveCountMax 120

    Port 22000
    User fooey
    IdentityFile ~/.ssh/github.key
    LocalForward 9906 127.0.0.1:3306
    more : http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html

    October 10, 2013 at 11:36:42 AM GMT+2 - permalink - archive.org - https://links.infomee.fr/?0hyAJQ
    config memo proxy ssh
  • Tunnel SSH avec l'option -R - Yop

    Un exemple d'utilisation de -R

    September 26, 2013 at 9:31:23 PM GMT+2 - permalink - archive.org - http://blog.uggy.org/post/2006/02/17/76-ssh-r-ou-comment-monter-une-connexion-ssh-dans-le-sens-inverse
    ssh tunnel
  • Tynsoe projects
    September 26, 2013 at 9:11:09 PM GMT+2 - permalink - archive.org - http://projects.tynsoe.org/fr/stm/doc.php
    ssh tunnel
  • Configurer un serveur SFTP (FTP sur SSH) | Halpanet

    Donner un acces sftp chrooté

    July 23, 2013 at 10:18:14 PM GMT+2 - permalink - archive.org - http://www.halpanet.org/?q=content/configurer-un-serveur-sftp-ftp-sur-ssh
    chroot sftp ssh
  • Top 20 OpenSSH Server Best Security Practices
    May 8, 2013 at 6:21:58 PM GMT+2 - permalink - archive.org - http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html
    debian knocking port secure ssh
  • http://artisan.karma-lab.net/faire-passer-trafic-tunnel-ssh
    April 4, 2013 at 11:12:16 PM GMT+2 - permalink - archive.org - http://artisan.karma-lab.net/faire-passer-trafic-tunnel-ssh
    socks ssh tunnel
  • Tunnel ssh : ssh -L (local) et ssh -R (remote) en bref - Bienvenue sur Think-Underground.com
    November 26, 2012 at 4:21:19 PM GMT+1 - permalink - archive.org - http://www.think-underground.com/post/2007/02/24/398-tunnel-ssh-ssh-l-local-et-ssh-r-remote-en-bref
    ssh tunnel
  • SSHFS : montage de systèmes de fichiers via SSH - Wiki Fedora-Fr
    October 17, 2012 at 4:16:19 PM GMT+2 - permalink - archive.org - http://doc.fedora-fr.org/wiki/SSHFS_:_montage_de_syst%C3%A8mes_de_fichiers_via_SSH
    montage mount ssh sshfs
  • Tester le débit réseau entre deux machines Linux - Tux-planet
    September 22, 2012 at 9:23:18 PM GMT+2 - permalink - archive.org - http://www.tux-planet.fr/tester-le-debit-reseau-entre-deux-machines-linux/
    debit network scp ssh test
  • How to Install AjaxTerm Tutorial
    August 30, 2012 at 6:15:34 PM GMT+2 - permalink - archive.org - http://mewbies.com/how_to_install_ajaxterm_tutorial.htm
    base client ssh web
  • Ajaxterm- A web based terminal that help you use ssh from a web browser | Unixmen
    August 30, 2012 at 5:12:05 PM GMT+2 - permalink - archive.org - http://www.unixmen.com/ajaxterm-a-web-based-terminal-that-help-you-use-ssh-from-a-web-browser/
    base client ssh web
Links per page: 20 50 100
◄Older
page 3 / 4
Newer►
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation