Vote 0 Votes

一般是建 Key 來達成 ssh 免密碼, 若不想建 Key, 可以用 sshpass
sshpass 可以在 ssh 時自動將密碼帶入
密碼可以用檔案(-f filename)或參數(-p password)或變數SSHPASS(-e)帶入
sshpass -f pass_file ssh
sshpass -p password ssh
export SSHPASS=password
sshpass -e
當然也可以直接執行所連線主機的 command
sshpass -e cat /etc/hosts

About this Entry

This page contains a single entry by Pank published on May 11, 2016 10:16 PM.

Opera built-in VPN was the previous entry in this blog.

Regex geedy and non-greedy match is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives