zhangzhengfu / sshpass

Mirror of http://sourceforge.net/projects/sshpass/ with support of auto confirmation and 2-Step Verification!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSHPass

SSHpass offers you the ability to automatically offer a password via SSH when you are prompted for it.

NEW: This fork supports google two-step authentication and auto confirmation with yes.

NOTE: Check here for one-line setup script for non-sudoers.

Usage

export SSHVCODE=YOUR_GOOGLE_AUTHE_SECRET
export SSHPASS=YOUR_SSH_PASSWORD
sshpass -e -y ssh user@host

For jump server, edit the ~/.ssh/config file

LogLevel ERROR

Host *
    User lizz
    ForwardAgent yes
    ServerAliveInterval 60
    ServerAliveCountMax 10

Host jumper
    HostName jumper.jumper.com

Host server
    HostName 1.2.3.4
    ProxyCommand sshpass -e -y ssh -q -W %h:%p jumper

Install

# dependencies
sudo apt install oathtool
sudo apt-get install autoconf

git clone git@github.com:innerlee/sshpass.git
cd sshpass
autoreconf -f -i
./configure --prefix=$HOME/app
make -j && make install

Related Projects

About

Mirror of http://sourceforge.net/projects/sshpass/ with support of auto confirmation and 2-Step Verification!

License:Other


Languages

Language:Shell 50.3%Language:Makefile 25.8%Language:C 17.9%Language:Roff 5.0%Language:M4 1.1%