Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support scp -p using tsh. #2889

Closed
benarent opened this issue Jul 31, 2019 · 4 comments · Fixed by #4764
Closed

Support scp -p using tsh. #2889

benarent opened this issue Jul 31, 2019 · 4 comments · Fixed by #4764
Assignees
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements good-starter-issue Good starter issue to start contributing to Teleport scp tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Comments

@benarent
Copy link
Contributor

What happened:

This issue has been created by a customer, we currently don't support scp -p which preserve the time stamps of the source files.

tsh scp doesn't support -p (preserver timestamps)

Currently we get error: unknown short flag '-p'

What you expected to happen:

@benarent benarent added feature-request Used for new features in Teleport, improvements to current should be #enhancements good-starter-issue Good starter issue to start contributing to Teleport tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Jul 31, 2019
@webvictim
Copy link
Contributor

-v (verbose) and -q (quiet) are two in common usage that we should probably have support for as well.

@russjones russjones added this to the 5.1 "San Diego" milestone Jun 24, 2020
@benarent benarent added the scp label Jul 27, 2020
@sjackman
Copy link

Gentle bump on this issue.

I use cp -a in nearly all instances rather than cp (and cp -p if I want to deref a symlink) and scp -p instead of scp. It’s nice to have timestamps if you ever get into troubleshooting “where and when did this data come from?”

@sjackman
Copy link

sjackman commented Jan 6, 2021

Thank you, @a-palchikov! For others that find this issue, I've been using RSYNC_RSH='tsh ssh' rsync -a as a workaround.

@murmrs
Copy link

murmrs commented Apr 6, 2021

I don't want to fill this closed issue - but @sjackman, I can't seem to get this to work. scp works for me, but rsync dies on a known good folder with the below error after validating host. I am on an M1, so that could be a contributing factor. But just as a heads up, in case others stumble across this.

ERROR REPORT:
Original Error: *ssh.ExitError Process exited with status 12
Stack Trace:
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/lib/client/session.go:487 github.com/gravitational/teleport/lib/client.(*NodeSession).runCommand.func2
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/lib/client/session.go:158 github.com/gravitational/teleport/lib/client.(*NodeSession).regularSession
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/lib/client/session.go:475 github.com/gravitational/teleport/lib/client.(*NodeSession).runCommand
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/lib/client/api.go:1695 github.com/gravitational/teleport/lib/client.(*TeleportClient).runCommand
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/lib/client/api.go:1178 github.com/gravitational/teleport/lib/client.(*TeleportClient).SSH
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/tool/tsh/tsh.go:1307 main.onSSH.func1
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/lib/client/api.go:400 github.com/gravitational/teleport/lib/client.RetryWithRelogin
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/tool/tsh/tsh.go:1306 main.onSSH
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/tool/tsh/tsh.go:470 main.Run
	/private/tmp/teleport-20210316-37307-g8ehpd/teleport-6.0.2/tool/tsh/tsh.go:231 main.main
	/opt/homebrew/Cellar/go/1.16.2/libexec/src/runtime/proc.go:225 runtime.main
	/opt/homebrew/Cellar/go/1.16.2/libexec/src/runtime/asm_arm64.s:1130 runtime.goexit
User Message: Process exited with status 12
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(228) [Receiver=3.2.3]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements good-starter-issue Good starter issue to start contributing to Teleport scp tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants