Hacker News new | past | comments | ask | show | jobs | submit login

Or you know, you're ssh'd into a machine, that other developers use, too; has specific networking requirements, etc..



For shared accounts, it's really annoying if others mess with settings. For that reason, I use the following piece of shell code that I put in .bashrc. Explanation: you configure the MYMACHINE variable as the IP address you usually come from.

  # If we're logging in through SSH, write this down
  if [ -n "$SSH_CLIENT" ]; then
    # Alternative settings
    MYMACHINE="172.16.140.14"
    FROM=`echo $SSH_CLIENT | cut -f1 -d" "`
    case $FROM in
      *$MYMACHINE)
        export TMOUT=180 #Logout after 3 minutes
        set -o vi
        # all sorts of other settings
      ;;
    esac
  fi


Yep. I spend all day connected to machines that I have to access through a jump server because they have no direct internet access in or out themselves. No way is it worth it for me to customize anything there.

I realize that this is a pretty rare situation though.


I find TRAMP (https://www.emacswiki.org/emacs/TrampMode) invaluable in these situations. It lets you run shells/edit files on remote machines from within your local Emacs. There are a few quirks that you need to get used to, but it makes Emacs + a bunch of regular Linux boxes into something that feels very Plan-9-y.

In your case, you would want to look into the multihop settings that will let you open files and eshells on remote machines, but use an intermediate machine (your jump boxes) to get there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: