Unable to connect to TerpConnect using SFTP


Issue

You are attempting to connect to TerpConnect (or Glue), using an SFTP client or command line tool. The SFTP client or command line tool responds with Received message too long, or similar error message, after you submit your password, and the connection fails.

Environment

  • TerpConnect
  • SFTP client or command line tool
    • WinSCP
    • sftp

Resolution

  1. Connect to TerpConnect using an SSH client.
  2. Review the shell initialization scripts in your home directory for any commands that generate output. Some examples of shell initialization scripts found in your home directory are:
    • .cshrc.mine
    • .cshrc
    • .bashrc.mine
    • .bashrc
    • .profile
  3. Comment out any commands in these files that generate output for non-interactive shells, or wrap them in a conditional that checks whether the prompt is interactive before outputting.
  4. Try reconnecting to TerpConnect with your SFTP client or command line tool to determine if the issue is resolved.

Cause

A command in a shell initialization file is producing output that the SFTP client doesn't understand.

For example, your .cshrc.mine may contain the line: tap -q java. The tap command outputs the message tap is no longer supported, use [module avail] instead when executed. Adding a # at the beginning of the line will comment out the line, prevent the command from executing, and therefore prevent the output.