Stepping Stone script

Source: Internet
Author: User

#! /Bin/bash
A = "192.168.0.200"
B = "192.168.0.203"

# Disable the key position signal
Trapper (){
Trap ":" int exit tstp term Hup
}

While:
Do
Trapper
Clear
Cat <menu
1) Web $

2) Web $ B

3) Exit
menu
Read-P "Please input your choice number:" Num
case "$ num" in
1)
SSH 192.168.0.200
;
2)
SSH 192.168.0.203
;
3 | *)
exit
esac
done
~

This script is used to control the operation staff to directly connect to the application server and use an intermediate server to directly manage connections. First, ssh-keygen must be used on the intermediate server to generate the public key and private key, send the public key to each application server. Because the User Name of the application server does not have a password, direct access is controlled and can be connected using the public key. The user permissions granted by the administrator must be common user permissions. Therefore, you must set the script information to pop up when a common user logs on to the intermediate server, you cannot perform other operations (trapper Control) on the script except for the operation information prompted by the script. You can set an environment variable file Vim/etc/profile. d/tiaoban. sh, write: [$ UID-Ne 0] & source/etc/service/scripts/tiaoban. sh.

Stepping Stone script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.