1GH-CODESPACE-SSH(1)            GitHub CLI manual           GH-CODESPACE-SSH(1)
2
3
4

NAME

6       gh-codespace-ssh - SSH into a codespace
7
8
9

SYNOPSIS

11       gh codespace ssh [<flags>...] [-- <ssh-flags>...] [<command>]
12
13
14

DESCRIPTION

16       The  'ssh'  command  is  used  to SSH into a codespace. In its simplest
17       form, you can run 'gh cs ssh', select a  codespace  interactively,  and
18       connect.
19
20
21       The 'ssh' command also supports deeper integration with OpenSSH using a
22       format. Including this configuration in your ~/.ssh/config improves the
23       user  experience of tools that integrate with OpenSSH, such as bash/zsh
24       completion   of   ssh   hostnames,   remote   path    completion    for
25       scp/rsync/sshfs, git ssh remotes, and so on.
26
27
28       Once  that  is  set  up  (see the second example below), you can ssh to
29       codespaces as if they were ordinary remote hosts (using 'ssh', not  'gh
30       cs ssh').
31
32
33

OPTIONS

35       -c, --codespace <string>
36              Name of the codespace
37
38
39       --config
40              Write OpenSSH configuration to stdout
41
42
43       -d, --debug
44              Log debug data to a file
45
46
47       --debug-file <string>
48              Path of the file log to
49
50
51       --profile <string>
52              Name of the SSH profile to use
53
54
55       --server-port <int>
56              SSH server port number (0 => pick unused)
57
58
59

EXAMPLE

61              $ gh codespace ssh
62
63              $ gh codespace ssh --config > ~/.ssh/codespaces
64              $ printf 'Match all\nInclude ~/.ssh/codespaces\n' >> ~/.ssh/config
65
66
67
68
69

SEE ALSO

71       gh-codespace(1)
72
73
74
75                                   Jun 2022                GH-CODESPACE-SSH(1)
Impressum