Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
home_server:home_server_setup:other_services:ssh [2022-06-26 Sun wk25 16:18] – baumkp | home_server:home_server_setup:other_services:ssh [2023-12-26 Tue wk52 11:38] (current) – 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 70: | Line 73: | ||
++++ | ++++ | ||
+ | ====Python Code==== | ||
+ | ++++python3 agnostic code | | ||
< | < | ||
# | # | ||
Line 80: | Line 85: | ||
import uuid | import uuid | ||
import re | import re | ||
- | |||
def get_size(bytes, | def get_size(bytes, | ||
Line 107: | Line 111: | ||
print(f" | print(f" | ||
print(f" | print(f" | ||
- | |||
# Boot Time | # Boot Time | ||
Line 114: | 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 131: | Line 133: | ||
print(f" | print(f" | ||
print(f" | print(f" | ||
- | |||
# Memory Information | # Memory Information | ||
Line 141: | Line 142: | ||
print(f" | print(f" | ||
print(f" | print(f" | ||
- | |||
- | |||
print(" | print(" | ||
Line 151: | Line 150: | ||
print(f" | print(f" | ||
print(f" | print(f" | ||
- | |||
- | |||
# Disk Information | # Disk Information | ||
Line 197: | Line 194: | ||
print(f" | print(f" | ||
print(f" | print(f" | ||
- | |||
if __name__ == " | if __name__ == " | ||
Line 203: | Line 199: | ||
System_information() | System_information() | ||
</ | </ | ||
+ | ++++ | ||
- | Some Links: | + | ====Some Links:==== |
*[[How to manage SSH login message|https:// | *[[How to manage SSH login message|https:// | ||
*[[HowTo: Set a Warning Message (Banner) in SSH|https:// | *[[HowTo: Set a Warning Message (Banner) in SSH|https:// |