Python scripts I use to manage my ssh connections, drive mounts, and other bash related things.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

181 lines
5.2 KiB

5 years ago
5 years ago
6 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
5 years ago
  1. # Roosay
  2. ```
  3. /-----------\
  4. < Only at RIT >
  5. \-----------/
  6. \ /)/)
  7. \ (ø.ø)
  8. \ ( />
  9. __/ _\ //
  10. '~( '~ )//
  11. _\ '}/
  12. "--~(/
  13. ```
  14. roosay is a simple python script which displays an ascii roo with a quote above it
  15. ## Usage
  16. ```
  17. python3 roosay.py Super cool message
  18. ```
  19. or create a .bashrc alias
  20. ```
  21. roosay super cool message
  22. ```
  23. # Install
  24. Use git to clone this project onto your system. A one-command installation can be done using the `git clone`
  25. ```
  26. git clone https://github.com/jrtechs/bash_manager.git
  27. ```
  28. # Dependencies
  29. Make sure that you have the following programs installed.
  30. - python3
  31. - ssh
  32. - ssh-copy-id
  33. - sshfs (only for ssh drive manager)
  34. - fusermount (only for ssh drive manager)
  35. # SSH Manager
  36. ```
  37. **************************************
  38. * SSH manager V 1.1 *
  39. * 1) user1@host_name *
  40. * 2) user2@host_name_2 *
  41. * A) Exit *
  42. * B) Manager tools *
  43. * C) Socks Tunnel *
  44. * D) SSH Drive Manager *
  45. **************************************
  46. ```
  47. ## About
  48. I developed this program to simply make it easier to manager all your ssh accounts
  49. in a single program. SSH keys are nice; however, you still have type "ssh user1@host"
  50. every time you wish to connect to a computer -- which can be a lot for some people.
  51. This program keeps track of all your ssh accounts so they are a few keystrokes away.
  52. ## Installation
  53. This program is simply a python script that you execute.
  54. ```
  55. python3 ssh_manager.py
  56. ```
  57. You can edit your bash configuration with an alias to make it easier to execute.
  58. ```
  59. alias ss="python3 /path/to/this/file/ssh_manager.py"
  60. ```
  61. To make this easier, the configuation manager of this program will has the option to
  62. append this and a few other aliases to your bash manager. This will automatically
  63. use the location of the scripts in the file.
  64. The first time you run this program it will ask you for the locations where you want to store
  65. some files which will be used to store the host names and user accounts. The default is to put
  66. it in the same directory as the source code.
  67. ## Usage
  68. After you accept the configuration you will see something like this.
  69. ````
  70. **************************************
  71. * SSH manager V 1.1 *
  72. * A) Exit *
  73. * B) Manager tools *
  74. * C) Socks Tunnel *
  75. * D) SSH Drive Manager *
  76. **************************************
  77. **************************************
  78. ````
  79. I would like to believe that I made this menu intuitive enough so you don't have to
  80. read any documentation. However...
  81. Typing B will pull up this menu:
  82. ````
  83. **************************************
  84. * Options *
  85. * 1) Add Host *
  86. * 2) Copy SSH key to server *
  87. * 3) Remove host name *
  88. * 4) Return to ssh manager *
  89. * 5) Manage Configuration and Bash *
  90. * 6) Exit *
  91. **************************************
  92. Enter selection:
  93. ````
  94. This is where you can run the add host names to the manager -- same as adding them to
  95. the "servers.txt".
  96. If you don't have ssh keys installed on your servers, or forgot the command to do so,
  97. you can use the "2" option to copy your ssh key to a server.
  98. "3" Pulls up an additional menu which you can use to select a entry to remove.
  99. "4" Returns to the main manager window.
  100. "5" Edits the configuration which stores where this program keeps text documents
  101. for the hosts used.
  102. If you added some accounts your main window should look like this:
  103. ````
  104. **************************************
  105. * SSH manager V 1.1 *
  106. * 1) user1@host_name *
  107. * 2) user2@host_name_2 *
  108. * A) Exit *
  109. * B) Manager tools *
  110. * C) Socks Tunnel *
  111. * D) SSH Drive Manager *
  112. **************************************
  113. ````
  114. Now is the easy part. Simply enter the number of the computer you wish to connect to
  115. and it will open a ssh connection.
  116. If you are interested in doing lots of socks proxies -- for whatever reason.
  117. From the main menu type "C".
  118. ````
  119. **************************************
  120. * Socks Tunnel *
  121. * 1) user1@host_name *
  122. * 2) user2@host_name_2 *
  123. * A) Exit *
  124. * B) Main *
  125. **************************************
  126. ````
  127. Now whichever computer you select, it will open a socks proxy. To use the proxy use
  128. localhost and port 8123.
  129. # SSH Drive Mount Manager
  130. This manager makes it easier to mount ssh drives using the "fusermount" command.
  131. ```
  132. **************************************
  133. * SSH Drive Manager *
  134. * 1) Mount SSH Drives *
  135. * 2) Un-Mount SSH Drives *
  136. * 3) Remove Remote Drive *
  137. * 4) Add Drive to Mount *
  138. * 5) View Drives *
  139. * 6) Usage *
  140. * 7) Manage Config *
  141. * 8) Exit *
  142. **************************************
  143. ```
  144. # Benifits
  145. This SSH manager will help to manage everything easily without any fails.