So, I have had issues with scp'ing and sftp'ing into machines that change from csh to bash via .cshrc. The protocols for both SCP and SFTP operate over an SSH shell, so if strange text is delivered to them and they can't handle it, they fail. If the first thing that happens when they SSH into the machine is that the shell underneath changes from csh to bash, they get confused and fail or hang. Consequently, I had added the following code snippet to .cshrc on such machines:
if ("$TERM" != "dumb") then exec bash exit endif
However, on one of them, I then see printed to my screen "TERM: Undefined variable". So, I have now updated the .cshrc to check whether it's defined, too:
if ("$?TERM") then if ("$TERM" != "dumb") then exec bash exit endif endif
Yay, better workiness.
No comments:
Post a Comment