Languages
[Edit]
EN

Putty - automatically login to root account with MTPuTTY when login to root account is not permitted by SSH server

8 points
Created by:
Bess
571

In this article, we would like to show you how to automatically login to a root account via SSH when such login operation is disabled for security reasons. The article shows how to configure a login operation with MTPuTTY.

Simple steps:

  1. click Server -> Add server...,
  2. set Connection parameters tab:
    Server name:      my-server.com
    Protocol:         SSH
    Display name:     root@my-server.com
    User name:        my_user_name
    Password:         my_secret_user_password
    You can set last properties as you feel, e.g.:
    Password in command line (SSH only):                     unchecked
    Wait period before typing password (in milliseconds):    1000
  3. go to Script tab and paste following code:
    ###_SLEEP:1000
    su -l root
    ###_SLEEP:1000
    my_secret_root_password

    Where: 400 can be replaced by any time of waiting for next operation in milliseconds.

  4. click Ok button,
  5. check if you are able to login as root now.

Steps: 2 and 3 on screenshots:

MTPuTTY with login as root example
MTPuTTY with login as root example
Example configuration for MTPuTTY login as any user via SSH
Step 2: Example configuration for MTPuTTY login as any user via SSH
Script for MTPuTTY login as root when root in SSH server is disabled
Step 3: Script for MTPuTTY login as root when root in SSH server is disabled
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join