Difference between revisions of "Sshs"

From wikieduonline
Jump to navigation Jump to search
(Created page with " # Wrapper for ssh to automatically source bash config file on remote machine. # Sources ~/.bashrc_remote # # author Jonah Dahlquist # license CC0 sshs() {...")
 
Line 1: Line 1:
 
+
{{lc}}
  
 
  # Wrapper for ssh to automatically source bash config file on remote machine.
 
  # Wrapper for ssh to automatically source bash config file on remote machine.
Line 11: Line 11:
 
         ssh -t ${*:1} "bash --rcfile /tmp/.bashrc_temp ; rm /tmp/.bashrc_temp"
 
         ssh -t ${*:1} "bash --rcfile /tmp/.bashrc_temp ; rm /tmp/.bashrc_temp"
 
  }
 
  }
 +
 +
Source: https://gist.github.com/jonahbron/5549848
 +
 +
 +
 +
== Related ==
 +
[[.bashrc]]
 +
 +
* {{Bash}}
 +
* {{ssh}}

Revision as of 08:05, 7 February 2023

# Wrapper for ssh to automatically source bash config file on remote machine.
# Sources ~/.bashrc_remote
#
# author Jonah Dahlquist
# license CC0 

sshs() {
        ssh ${*:1} "cat > /tmp/.bashrc_temp" < ~/.bashrc_remote
        ssh -t ${*:1} "bash --rcfile /tmp/.bashrc_temp ; rm /tmp/.bashrc_temp"
}
Source: https://gist.github.com/jonahbron/5549848


Related

.bashrc

Advertising: