Skip to content

Fix sftp server not evaluating '.' correctly#61698

Merged
atburke merged 1 commit intomasterfrom
atburke/sftp-realpath-wd
Nov 24, 2025
Merged

Fix sftp server not evaluating '.' correctly#61698
atburke merged 1 commit intomasterfrom
atburke/sftp-realpath-wd

Conversation

@atburke
Copy link
Copy Markdown
Contributor

@atburke atburke commented Nov 21, 2025

This change fixes a bug where the local Teleport sftp server (from teleport sftp) would not correctly evaluate the realpath for "." to the current directory. This caused the forwarding server to report the wrong working directory (which it determines by calling Realpath(".") and appending to "/").

Fixes #61265.

Changelog: Fixed relative path evaluation for SFTP in proxy recording mode

Test Plan

  • sftp with a relative path works in proxy recording mode
  • The following are unaffected:
    • absolute path in proxy recording mode
    • relative path in node recording mode
    • absolute path in node recording mode

@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from hugoShaka November 24, 2025 20:24
@atburke atburke added this pull request to the merge queue Nov 24, 2025
Merged via the queue into master with commit 9fb4dae Nov 24, 2025
46 checks passed
@atburke atburke deleted the atburke/sftp-realpath-wd branch November 24, 2025 23:03
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@atburke See the table below for backport results.

Branch Result
branch/v17 Create PR
branch/v18 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tsh scp fails for remote targets with relative paths when in proxy recording mode

3 participants