UNDERCODE COMMUNITY
2.7K subscribers
1.24K photos
31 videos
2.65K files
81.6K links
πŸ¦‘ Undercode World!
@UndercodeCommunity


1️⃣ World first platform which Collect & Analyzes every New hacking method.
+ Pratice
@Undercode_Testing

2️⃣ Cyber & Tech NEWS:
@Undercode_News

3️⃣ CVE @Daily_CVE


✨ Youtube.com/Undercode
by Undercode.help
Download Telegram
Forwarded from UNDERCODE NEWS
Fresh patent exposure for Microsoft: to use personal details to build a robot for the automated rebirth of dead.
#Technologies
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘Creating bash script for multiple remote logins :


Β» create a script to help copy the public key to multiple remote Linux hosts.

# vim ~ / .bin / ssh-copy.sh
Copy and paste the following code into the file (replace the following variables accordingly USER_NAME is the username to connect, HOST_FILE is the file containing the list of hostnames or IP addresses, and ERROR_FILE is the file to store any errors from the ssh command).
#! / bin / bash
USER_NAME = "root"
HOST_FILE = "/ root / hosts"
ERROR_FILE = "/ tmp / ssh-copy_error.txt"
PUBLIC_KEY_FILE = "$ 1"

if [! -f $ PUBLIC_KEY_FILE]; then
echo "File '$ PUBLIC_KEY_FILE' not found!"
exit 1
fi

if [! -f $ HOST_FILE]; then
echo "File '$ HOST_FILE' not found!"
exit 2
fi

for IP in cat $ HOST_FILE; do
ssh-copy-id -i $ PUBLIC_KEY_FILE $ USER_NAME @ $ IP 2> $ ERROR_FILE
RESULT = $?
if [$ RESULT -eq 0]; then
echo ""
echo "Public key copied to $ IP successfully"
echo ""
else
echo "$ (cat $ ERROR_FILE)"
echo
exit 3
fi
echo ""
done
Save the file and close it.

Then make the script executable with the chmod command, as follows:

# chmod + x ssh-copy.sh
Now run the ssh-copy.sh script and provide your public key file as the first argument as shown below:
# ./ssh-copy.sh /root/.ssh/prod-rsa.pub
Then use ssh-agent to manage your keys, which stores your decrypted private key in memory and uses it to authenticate logins.
After starting ssh-agent add your private key to it like this:

# eval "$ (ssh-agent -s)"
# ssh-add ~ / .ssh / prod_rsa
Login to remote Linux server without password
You can now log into any of your remote hosts without entering a password to authenticate the SSH user.

This way you can automate cross-server processes.

# ssh root@10.2.xy

(be smart & don't copy our tips !|)_
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁