<commit_before>#!/usr/bin/expect

trap {
 set rows [stty rows]
 set cols [stty columns]
 stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH

set user [lindex $argv 0]  
set pass [lindex $argv 1]  
set host [lindex $argv 2]  
set port [lindex $argv 3]  
set timeout 30
spawn ssh -l $user $host -p $port
puts "password: $pass"
expect {
  -re "Are you sure you want to" 
  {
    send "yes\r"
    expect "password:"
    send "$pass\r"
  } 
  -re "password:"
  {
    send "$pass\r"
  }
}
#expect "password:"
#send "$pass\r"
interact<commit_msg>Update ssh.sh<commit_after>#!/usr/bin/expect

trap {
 set rows [stty rows]
 set cols [stty columns]
 stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH

set user [lindex $argv 0]  
set pass [lindex $argv 1]  
set host [lindex $argv 2]  
set port [lindex $argv 3]  
set timeout 30
spawn ssh -l $user $host -p $port
# puts "password: $pass"
expect {
  -re "ssh-keygen -f"
  {
    exit 403
  }
  -re "Are you sure you want to"
  {
    send "yes\r"
    exp_continue
  }
  -re "password:"
  {
    send "$pass\r"
  }
}

interact
{'fraction_non_alphanumeric': 0.13732718894009216, 'fraction_numerical': 0.013824884792626729, 'mean_word_length': 2.8785714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4504842', 'n_tokens_mistral': 459, 'n_tokens_neox': 435, 'n_words': 144}