SSH hands-free password entry and proxy settings

By using sshpass to write the password into the command and execute it directly, the steps to avoid manual password input are
as follows:

sshpass -p password_abc ssh user_abc@ssh_host -p ssh_port

If you connect to the target ssh server through a proxy in the office, you can set the proxy by using corkscrew, the
command is as follows:

ssh user@hostname -o " ProxyCommand corkscrew proxy address proxy port ssh server address ssh port "

sshpass and corkscrew can be combined with
the following commands:

sshpass -p password_abc ssh user_abc@ssh_host -o "ProxyCommand /usr/local/bin/corkscrew proxy_host proxy_port ssh_host ssh_port"

download sshpass
download corkscrew

Problems and solutions encountered when installing corkscrew under mac:
./configure If you encounter the error "specify host type", run autoconf once in the current directory (if the machine does not have it, you need to install it yourself);
then ./configure, If you encounter the error "specify build type", execute:

./configure --build=i686-apple

Then make && make install is OK

Permanent address of this article: http://blog.beatzeus.com/?p=5

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326389382&siteId=291194637