Commit 26a03875 by Rinat K. Nugaev

Bug fixed

parent 9961401d
......@@ -16,7 +16,7 @@
# - Added automatic adding username after first successful login
# - Added automatic exit if cant create ssh session with current login
# - Addedd some help information while tunnel creating
user=""
user=nrk
#
#Defining some colours for fun )))
RED='\033[0;31m'
......@@ -32,7 +32,7 @@ if [ -z "$user" ] ; then
echo "Username not defined in script, asking for username!"
read -p "Enter your username like PertrovPP:" user
#Cheking username for ssh connection and if good then add it to script variables
statusssh=$(ssh -v -o BatchMode=yes -o ConnectTimeout=5 -p 10022 $user@tunnel01.rbtechnologies.ru echo ok 2>&1)
statusssh=$(ssh -o BatchMode=yes -o ConnectTimeout=5 -p 10022 $user@tunnel01.rbtechnologies.ru echo ok 2>&1)
if [[ $statusssh == ok ]] ; then
echo "Adding username $user for future use in the script"
sed -i -e '0,/user=""/s/user=""/user='$user'/' $0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment