Open programmerq opened 1 year ago
Workaround that worked for me:
tsh ssh
tsh scp
Workaround that worked for me:
- connect using
tsh ssh
- While that session is connected, in a different terminal copy file using
tsh scp
I can confirm this workaround worked for me too. Found the workaround accidentally when me and a co-worker was investigating the issue and I was able to transfer files and he was not. We discovered that we need an active user when having 'create_host_user' on.
My versions: Teleport v12.2.4 git:v12.2.4-0-g0f5a2d8 go1.20.3 Proxy version: 12.2.3
I confirm it's still the case in teleport v13, causing problems while using Ansible
[WARNING]: sftp transfer mechanism failed on [teleport--test-3]. Use ANSIBLE_DEBUG=1 to see detailed information
[WARNING]: scp transfer mechanism failed on [teleport--test-3]. Use ANSIBLE_DEBUG=1 to see detailed information
[WARNING]: piped transfer mechanism failed on [teleport--test-3]. Use ANSIBLE_DEBUG=1 to see detailed information
fatal: [teleport--test-3]: FAILED! =>
msg: |-
failed to transfer file to /<redacted>/AnsiballZ_setup.py:
dd: failed to open '/<redacted>/AnsiballZ_setup.py': No such file or directory
Here is workaround which I was able to make based on previous comments:
tsh ssh "user@<IP>" "while true; do sleep 30; done" &
# save PID to kill process after work
pid=$!
# make echo first to avoid race condition with background process
tsh ssh "user@<IP>" "echo"
<do any stuff like e.g. Ansible playbook>
# kill background process
kill -9 "${pid}"
I recently switched to teleport v14, tsh scp
also does not work with users created by Teleport.
Any update for this issue, please? We're using Teleport v15 and facing the same problem, too.
Expected behavior:
When using the
create_host_user
feature that dynamically adds/removes a host user on an ssh node,tsh scp
should work as expected.Current behavior:
The
ubuntu
user that does not already exist on the host is successfully auto-created and auto-deleted when usingtsh ssh
but not when usingtsh scp
.Bug details:
Teleport Enterprise v12.0.4 git:api/v12.0.4-0-gcf72ee5d59 go1.20.1
tsh scp
will fail whiletsh ssh
works.ssh_service debug logs on the
testscp
node: