lib/ssh/manager/cli.rb in ssh-manager-1.0.2 vs lib/ssh/manager/cli.rb in ssh-manager-1.0.3
- old
+ new
@@ -90,11 +90,11 @@
group = $stdin.gets.chomp
puts 'Connect via(ip): '
connect_via_ip = $stdin.gets.chomp
puts 'With Username: '
connect_via_user = $stdin.gets.chomp
- connect_via= "#{connect_via_user}@#{connect_via_ip}"
- # ssh -A -t jxs@10.160.64.184 ssh -A -t tux@10.160.65.2
+ connect_via = ""
+ connect_via= "#{connect_via_user}@#{connect_via_ip}" unless connect_via_user.empty?
count = 0
created_at = Time.now.to_s
last_time = Time.now.to_s
DATABASE.add_new_connection(ip, user, hostname, port, note, connect_via, created_at, options, count, group, last_time)
end