def add_connection(ip)
puts 'Username: '
user = $stdin.gets.chomp
user = 'root' if user == ''
puts 'Hostname: '
hostname = $stdin.gets.chomp
puts 'port: '
port = $stdin.gets.chomp
port = '22' if port == ''
puts 'Notes: '
note = $stdin.gets.chomp
puts 'Options: '
options = $stdin.gets.chomp
options = '' if options == ''
puts 'Group: '
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= "#{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