Monthly Archives: February 2013

How to retrieve Plesk admin password on Windows

APPLIES TO:

Parallels Plesk Panel 11.x for Windows
Parallels Plesk Panel 10.x for Windows
Parallels Plesk Panel 9.x for Windows
Parallels Plesk Panel 8.x for Windows

You can set up a new password by running the following command:
"%plesk_bin%plesksrvclient" -set true

You can also retrieve the current password by running this utility with:
"%plesk_bin%plesksrvclient" -get

To retrieve the password in the command line, you can use -nogui option:
"%plesk_bin%plesksrvclient" -get -nogui > plesk_password.txt

Automatic login using SSH credentials in Ubuntu.

Download first an installer called “expect”.
apt-get install expect

Create your own shell script. Below is an example on how you can connect to the ssh server automatically.

#!/usr/bin/expect -f
# Expect script to supply root/admin password for remote ssh server
# and execute command.
# This script needs three argument to(s) connect to remote server:
# password = Password of remote UNIX server, for root user.
# ipaddr = IP Addreess of remote UNIX server, no hostname
# scriptname = Path to remote script which will execute on remote server
# For example:
#  ./sshlogin.exp password 192.168.1.11 who
# ------------------------------------------------------------------------
# Copyright (c) 2004 nixCraft project <http://cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# ----------------------------------------------------------------------
# set Variables
set password mypassword
set ipaddr 192.168.1.1
set timeout -1
# now connect to remote UNIX box (ipaddr) with given script to execute
spawn ssh choi@$ipaddr -p2002 -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no
match_max 100000
# Look for passwod prompt
expect "*?assword:*"
# Send password aka $password
send "$passwordr"
interact

Execute your shell script.
./mysshlogin.exp