7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/punt/mode/mode_scp.rb', line 7
def mode_start(mode_opts: nil, dry_run: false, verbose: true)
@has_sshpass = feature_detect_sshpass
if @has_sshpass && !mode_opts['ssh_key']
print "(using sshpass) enter the ssh password: "
@ssh_password = gets.chomp
elsif !mode_opts['ssh_key']
puts "sshpass is not installed. You will need to enter your password for every scp action that is generated. To avoid entering your password for every scp action, you can switch to key-based authentication by setting ssh_key. If key based authentication is not possible, try installing sshpass (https://gist.github.com/arunoda/7790979)"
puts ""
end
end
|