[HN Gopher] An SSH adventure; or, why l10n support is important
       ___________________________________________________________________
        
       An SSH adventure; or, why l10n support is important
        
       Author : todsacerdoti
       Score  : 6 points
       Date   : 2025-04-14 17:32 UTC (5 hours ago)
        
 (HTM) web link (gitlab.com)
 (TXT) w3m dump (gitlab.com)
        
       | jmholla wrote:
       | This article has an asterisk on the title.
       | 
       | > (* not actually why l10n support is important)
       | 
       | I'm honestly not sure why it's included in the title there at
       | all. There really is no talk about localization in the document.
       | 
       | This article is about custom bash and vim configurations when
       | SSHing into a machine. The roadblocks the author runs into aren't
       | too surprising to anyone that has a fairly deep understanding of
       | SSH, bash, and Linux processes, but a worthwhile read for more
       | novice users.
       | 
       | For the more advanced, I think the tone can get a little weird,
       | with the author expecting behaviors that don't make sense. But,
       | they do quickly realize why their expectations were not met.
       | 
       | There is one point where they didn't explain what was going on.
       | When they attempted                   echo 'alias puppet_="sudo
       | puppet agent --test"' > custom-bashrc         ssh -t secret-
       | abc123.1d6.org "bash --rcfile <( echo '"$(cat custom-bashrc)"' )"
       | 
       | The issue here was the shell's invocation of echo losing the
       | quotes in their file. One option, assuming both ends have
       | `base64`, is to reencode the file.                   ssh -t
       | secret-abc123.1d6.org "bash --rcfile <( echo '"$(base64 bashrc)"'
       | | base64 -d )"
       | 
       | There might also be some sed invocation that can properly escape
       | everything, but I think I'm good on spending any more time on
       | this.
       | 
       | Also, there is a commenter trying out a few other successful
       | "file smuggles" that are worth a gander. (My favorite is their
       | usage of environment variables locally to bypassing the shell's
       | "removal" of quotes.)
        
       ___________________________________________________________________
       (page generated 2025-04-14 23:01 UTC)