SSH Shell script help
- From: "Gowthaman N" <n.gowthaman@xxxxxxxxx>
- Date: Wed, 20 Jun 2007 18:13:52 +0530
Hi All,
I m writing a shell script to automate the configuration of password less
ssh logins between solaris servers
for a user id say xzy on either way (i.e) login without passwd from a->b and
b->a like that.
But my script does only the below things :
#!/usr/bin/bash
echo "To do passwdless login Port 22"
echo "First Time the userids would ask for passwds to create the public key"
if [ $# -le 0 ]; then
cmd=`basename $0`
echo . $cmd netid@server-ipaddress
exit 1
fi
remote=$1
if [ ! -f ~/.ssh/id_rsa.pub ]
then
echo " "
ssh-keygen -t rsa
fi
ssh $remote mkdir .ssh
chmod 0744 .ssh
scp .ssh/id_rsa.pub $remote:.ssh/authorized_keys
Can anyone provide me help in enhancing this.
Many Thanks
N. Gowthaman
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Prev by Date: default_stksize and Solaris 10
- Next by Date: error writing ufs log
- Previous by thread: default_stksize and Solaris 10
- Next by thread: error writing ufs log
- Index(es):
Relevant Pages
|
|