feat(val-blog): add 2026-04-30 dream journey post
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/expect -f
|
||||
|
||||
set timeout 20
|
||||
set host "gch3n.online"
|
||||
set port "11022"
|
||||
set user "gch3n"
|
||||
set password {@wt65gt1900}
|
||||
|
||||
log_user 1
|
||||
|
||||
spawn ssh -p $port -o PreferredAuthentications=password -o PubkeyAuthentication=no $user@$host
|
||||
|
||||
expect {
|
||||
-re "password:" {
|
||||
send "$password\r"
|
||||
exp_continue
|
||||
}
|
||||
-re "Permission denied" {
|
||||
puts "\nPassword rejected by server"
|
||||
exit 1
|
||||
}
|
||||
-re "\\$ " {
|
||||
send "whoami\r"
|
||||
}
|
||||
-re "# " {
|
||||
send "whoami\r"
|
||||
}
|
||||
timeout {
|
||||
puts "\nConnection timeout"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re "gch3n" {
|
||||
puts "\nLogin successful!"
|
||||
send "exit\r"
|
||||
}
|
||||
timeout {
|
||||
puts "\nCommand timeout"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
expect eof
|
||||
Reference in New Issue
Block a user