If you're looking to create a Bash script that connects to an SSH server and allows you to specify a password, you can use the sshpass
utility. Here's how to do it:
sudo apt-get install sshpass
#!/bin/bash
# Assign the password
PASSWORD="1"
# Assign the username and host
USER="maverick"
HOST="10.71.77.14"
# Use sshpass to connect to the SSH server
sshpass -p "$PASSWORD" ssh "$USER@$HOST"
chmod +x connect_to_kali.sh
./connect_to_kali.sh
#ssh
Comments
Post a Comment