Skip to content

Instantly share code, notes, and snippets.

@Rudis1261
Created August 29, 2016 06:21
Show Gist options
  • Save Rudis1261/5c5cbf104ab77bcf28259a9f855ad083 to your computer and use it in GitHub Desktop.
Save Rudis1261/5c5cbf104ab77bcf28259a9f855ad083 to your computer and use it in GitHub Desktop.
SSH Login Script - The Dirty Way
#!/usr/bin/expect -f
# REPLACE, <user>, <host> and <password>
spawn ssh <user>@<host>
expect "assword:"
send "<password>\r"
interact
@Rudis1261
Copy link
Author

  • Ensure that the script is executable chmod +x login.sh
  • Replace <user>, <password> and <host> with your server's details
  • KEEP THIS PRIVATE, this is free access to your server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment