SCP failing with error code 126

What happened :
tsh scp isnt working when trying to copy a file from an upstream server.

What you expected to happen :
tsh scp ubuntu@server:~/file.txt .
Must copy a file name file.txt to my local machine

How to reproduce it (as minimally and precisely as possible) :
tsh scp ubuntu@server:~/file.txt .

Environment :

  • Teleport version (use teleport version ): 3.1.1
  • Tsh version (use tsh version ): 3.1.1
  • OS (e.g. from /etc/os-release): Ubuntu 16.04

Browser environment

  • Browser Version (for UI-related issues):
  • Install tools:
  • Others:

Relevant Debug Logs If Applicable

Original Error: *ssh.ExitError Process exited with status 126
Stack Trace:
	/tmp/20181218T163658/src/ main.onSCP
	/tmp/20181218T163658/src/ main.Run
	/tmp/20181218T163658/src/ main.main
	/usr/local/go/src/runtime/proc.go:210 runtime.main
	/usr/local/go/src/runtime/asm_amd64.s:1334 runtime.goexit
User Message:
  • tsh --debug
  • teleport --debug

My best guess here is that exit code 126 is referring to a permissions issue when the remote shell tries to run the scp command.

Is this a stock Ubuntu system?
Are you logging in as a regular user or as root?
Are you able to scp the same file from the system using OpenSSH?

Thanks @gus. The issue was we set the umask to 0077 .

1 Like

Glad to hear you got it sorted, and thanks for the feedback!

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.