User Tools

Site Tools


remote_assistance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
remote_assistance [2024/10/20 12:10] steveremote_assistance [2025/10/02 23:27] (current) steve
Line 67: Line 67:
 mkdir -m 0700 -p ~/.ssh mkdir -m 0700 -p ~/.ssh
 cp /mnt/AssistanceKey ~/.ssh/ cp /mnt/AssistanceKey ~/.ssh/
-chmod 0600 .ssh/AssistanceKey+chmod 0600 ~/.ssh/AssistanceKey
 cp /mnt/AssistanceKey.pub ~/.ssh/ cp /mnt/AssistanceKey.pub ~/.ssh/
-chmod 0644 .ssh/AssistanceKey.pub +chmod 0644 ~/.ssh/AssistanceKey.pub 
-cat .ssh/AssistanceKey.pub >> .ssh/authorized_keys +cat ~/.ssh/AssistanceKey.pub >> ~/.ssh/authorized_keys 
-chmod 0644 .ssh/authorized_keys+chmod 0644 ~/.ssh/authorized_keys
  
  
Line 77: Line 77:
 cd ~/bin cd ~/bin
  
-# The construction below creates a file (srj-access.service) and then cats +# The construction below creates a file (adminaccess.service) and then cats 
 # everything to it until it matches the string 'EndOfText'. The dash strips # everything to it until it matches the string 'EndOfText'. The dash strips
-# out the leading tab that was added to make this easier to read.  +# out the leading tab that was added to make this easier to read. The "$(whoami)" 
-cat <<- EndOfText > srj-access.service+# returns the user you're logged in as, and this is the user that will get assistance
 +cat <<- EndOfText > adminaccess.service
  [Unit]  [Unit]
  Description=Permit admin access from secretuser@cyli.org  Description=Permit admin access from secretuser@cyli.org
Line 106: Line 107:
 EndOfText EndOfText
  
-chmod a+x srj-access.service +chmod a+x adminaccess.service 
-sudo cp srj-access.service /etc/systemd/system/srj-access.service +sudo cp adminaccess.service /etc/systemd/system/adminaccess.service 
-echo "Added srj-access.service (1)" | Log+echo "Added adminaccess.service (1)" | Log
  
 # Script below is a helper to enable the service, the "'" around EndOfText makes # Script below is a helper to enable the service, the "'" around EndOfText makes
Line 116: Line 117:
  # This script connects to cyli.org for assistance, opening  # This script connects to cyli.org for assistance, opening
  # a tunnel that remote admins can connect back through.  # a tunnel that remote admins can connect back through.
- ScriptName=srj-access.service+ ScriptName=adminaccess.service
  [ ${1} ] && Opt=$( echo ${1} | tr A-Z a-z )  [ ${1} ] && Opt=$( echo ${1} | tr A-Z a-z )
  case ${Opt} in  case ${Opt} in
Line 174: Line 175:
  
 Another nice thing to do is to set up a [[Shared 'screen' session]] on the Assisted user's machine, it could even be set up as part of the 'Steve' command to automatically connect the Assisted user to that screen. Maybe even close out the session when they press Ctrl-D. Another nice thing to do is to set up a [[Shared 'screen' session]] on the Assisted user's machine, it could even be set up as part of the 'Steve' command to automatically connect the Assisted user to that screen. Maybe even close out the session when they press Ctrl-D.
- 
remote_assistance.txt · Last modified: by steve