Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Set standard SSH environment variables in the workspace #2339

Closed
Assignees
mafredri
Labels
apiArea: HTTP APIcliArea: CLI
@mafredri

Description

@mafredri

As a user, I have unified dotfiles that behave differently on different systems and I would like to detect when I'm inside an SSH connection/on a remote system.

We should consider setting the following standard SSH environment variables:

SSH_CLIENT=192.168.0.2 52122 22SSH_CONNECTION=192.168.0.2 52122 192.168.0.1 22SSH_TTY=/dev/pts/1

TheSSH_TTY is not always/dev/pts/1, it varies depending on how many pseudo ttys have been allocated. It's also not set when running a command without tty (e.g.ssh coder.ws env).

     SSH_CONNECTION        Identifies the client and server ends of the                           connection.  The variable contains four space-                           separated values: client IP address, client port                           number, server IP address, and server port number.          [...]          SSH_TTY               This is set to the name of the tty (path to the                           device) associated with the current shell or                           command.  If the current session has no tty, this                           variable is not set.

Metadata

Metadata

Assignees

Labels

apiArea: HTTP APIcliArea: CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp