Words do not say much, there is a picture for evidence, mainly the ability to express, hehe ....
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/33/wKioL1X3xzDxuicXAAFlV9m16Ow065.jpg "title=" Bastion machine flowchart. png "alt=" wkiol1x3xzdxuicxaaflv9m16ow065.jpg "/>
Simple description:
Fort Machine generally separate out, separate deployment, popular point is the springboard machine, the control machine.
A bastion machine is required to connect to the remote destination IP.
The Fortress Machine records all the operations of a user----the meaning of a bastion machine
One, the flowchart describes the function is very clear
Users must first log on to the fortress machine, and then complete the following 3 functions
1, Single machine login---> All operation warehousing
2, Batch machine execution command---> All operations warehousing
3. View operational records
Second, the significance of the Fortress machine (self-understanding):
1, Operation simplification, operations and maintenance personnel no longer need to remember the server's Username/password, directly select an IP can login operation;
2, Operation Normalization, all operations and maintenance personnel Unified Portal, the user records all operation.
3, the responsibility is clear, will be a login user's all operations are recorded in the database, there is a problem can be checked;
Three, the preparatory work:
1, must install Paramiko source code , to use the inside of the two files, on the basis of the two files for two times development;
Reference http://yunweipy.blog.51cto.com/10683003/1695014
2, two files are:paramiko-1.7.7.1/demo.py; PARAMIKO-1.7.7.1/interactive.py;
3, write your own program entry, login, verify. Call the demo module. Complete all functions;
4, build library, MySQL or Oracle, all can;
Four, source code analysis
Runpythonparamiko-1.7.7.1/demo.py, will pop up ' * * * here we go! ', search this string, and then look down,FindInteractive.interactive_shell (Chan), jump toin the Interactive_shell method of the interactive module , the analysis Nteractive_shell.
Found it
Def Interactive_shell (Chan, Loginuser, username, IP):
If Has_termios:
Posix_shell (Chan, Loginuser, username, IP)
Else
Windows_shell (Chan)
Then analyze the Posix_shell code, perhaps 20 lines of code, this is the completion of the Linux Fortress Machine core code, on this basis, two times development.
Cond...
OPS Fortress---based on Paramiko module