Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| home_server:home_server_setup:other_services:ssh [2022-06-26 Sun wk25 16:07] – [Login Scripts] baumkp | home_server:home_server_setup:other_services:ssh [2025-01-10 Fri wk02 10:59] (current) – [Some Links:] baumkp | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{tag> | ||
| ======SSH Notes====== | ======SSH Notes====== | ||
| Line 13: | Line 13: | ||
| ====Login Scripts==== | ====Login Scripts==== | ||
| + | ====Debian==== | ||
| *'' | *'' | ||
| The Debian script is very simple: | The Debian script is very simple: | ||
| - | < | + | < |
| #!/bin/sh | #!/bin/sh | ||
| uname -snrvm | uname -snrvm | ||
| </ | </ | ||
| + | |||
| + | ====Ubuntu==== | ||
| Ubuntu has multiple scripts some that I like and some that I do not like. | Ubuntu has multiple scripts some that I like and some that I do not like. | ||
| This system status information script, ++++/ | This system status information script, ++++/ | ||
| Line 67: | Line 70: | ||
| </ | </ | ||
| *If twisted not installed, '' | *If twisted not installed, '' | ||
| + | *if cpuinfo not installed, '' | ||
| ++++ | ++++ | ||
| + | ====Python Code==== | ||
| + | ++++python3 agnostic code | | ||
| < | < | ||
| # | # | ||
| Line 79: | Line 85: | ||
| import uuid | import uuid | ||
| import re | import re | ||
| - | |||
| def get_size(bytes, | def get_size(bytes, | ||
| Line 106: | Line 111: | ||
| print(f" | print(f" | ||
| print(f" | print(f" | ||
| - | |||
| # Boot Time | # Boot Time | ||
| Line 113: | Line 117: | ||
| bt = datetime.fromtimestamp(boot_time_timestamp) | bt = datetime.fromtimestamp(boot_time_timestamp) | ||
| print(f" | print(f" | ||
| - | |||
| # print CPU information | # print CPU information | ||
| Line 130: | Line 133: | ||
| print(f" | print(f" | ||
| print(f" | print(f" | ||
| - | |||
| # Memory Information | # Memory Information | ||
| Line 140: | Line 142: | ||
| print(f" | print(f" | ||
| print(f" | print(f" | ||
| - | |||
| - | |||
| print(" | print(" | ||
| Line 150: | Line 150: | ||
| print(f" | print(f" | ||
| print(f" | print(f" | ||
| - | |||
| - | |||
| # Disk Information | # Disk Information | ||
| Line 196: | Line 194: | ||
| print(f" | print(f" | ||
| print(f" | print(f" | ||
| - | |||
| if __name__ == " | if __name__ == " | ||
| Line 202: | Line 199: | ||
| System_information() | System_information() | ||
| </ | </ | ||
| + | ++++ | ||
| - | Some Links: | + | ====Some Links:==== |
| - | *[[How to manage SSH login message|https:// | + | *[[https:// |
| - | *[[HowTo: Set a Warning Message (Banner) in SSH|https:// | + | *[[https:// |
| - | *[[Protect SSH Logins with SSH & MOTD Banner Messages|https:// | + | *[[https:// |
| <- home_server: | <- home_server: | ||