Created
March 31, 2024 14:41
-
-
Save rizemon/35678c34214123cca90df4dd0cd4c4f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORKING_DIRECTORY="/home/kali/Desktop/" | |
cd $WORKING_DIRECTORY | |
mkdir -p "$WORKING_DIRECTORY/logs/ | |
DATE=`date +%d.%m.%y` | |
TIME=`date +%H.%M.%S` | |
LOGFILE="$WORKING_DIRECTORY/logs/$DATE-$TIME.commands.log" | |
USERNAME="kali" | |
PASSWORD="kali" | |
HOSTNAME="kali" | |
gnome-terminal --tab -- script -f "$LOGFILE" -c "sshpass -p $PASSWORD ssh -o \"StrictHostKeyChecking no\" $USERNAME@$HOSTNAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment