mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-30 14:06:08 +02:00
sudo read file
This commit is contained in:
@@ -107,9 +107,7 @@ if sys.argv[1] == "on":
|
|||||||
print("DONE")
|
print("DONE")
|
||||||
else:
|
else:
|
||||||
print("OK - root id_rsa.pub file exists")
|
print("OK - root id_rsa.pub file exists")
|
||||||
ssh_pubkey=""
|
ssh_pubkey = subprocess.check_output("sudo cat /root/.ssh/id_rsa.pub", shell=True, universal_newlines=True)
|
||||||
with open('/home/root/.ssh/id_rsa.pub', 'r') as file:
|
|
||||||
ssh_pubkey = file.read().replace('\n', '')
|
|
||||||
|
|
||||||
# make sure autossh is installed
|
# make sure autossh is installed
|
||||||
# https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-autossh/
|
# https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-autossh/
|
||||||
|
Reference in New Issue
Block a user