CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/account/ssh-keys/global-ssh-keys.tsx
Views: 926
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { FormattedMessage } from "react-intl";
7
import { useRedux } from "@cocalc/frontend/app-framework";
8
import { A, Paragraph, Text } from "@cocalc/frontend/components";
9
import { COLORS } from "@cocalc/util/theme";
10
11
import SSHKeyList from "./ssh-key-list";
12
13
export default function GlobalSSHKeys() {
14
const ssh_keys = useRedux("account", "ssh_keys");
15
16
return (
17
<div style={{ marginTop: "1em" }}>
18
<SSHKeyList
19
help={
20
<Paragraph>
21
<FormattedMessage
22
id="account.global-ssh-keys.help"
23
defaultMessage={`To SSH into a project, use the following
24
<code>username@host: [project-id-without-dashes]@ssh.cocalc.com</code>
25
The project id without dashes can be found in the part of project settings about SSH keys.
26
To SSH between projects, use <code>[project-id-without-dashes]@ssh</code>`}
27
values={{ code: (c) => <Paragraph code>{c}</Paragraph> }}
28
/>
29
</Paragraph>
30
}
31
ssh_keys={ssh_keys}
32
>
33
<Paragraph style={{ color: COLORS.GRAY_M }}>
34
<FormattedMessage
35
id="account.global-ssh-keys.info"
36
defaultMessage={`The global SSH keys listed here allow you to connect from your computer via SSH
37
to <strong><i>all projects</i> and <i>compute servers</i></strong>
38
on which you are an owner or collaborator.
39
Alternatively, set SSH keys that grant access only to a project in the settings for that project.
40
See <A>the docs</A>
41
or the SSH part of the settings page in a project for further instructions.`}
42
values={{
43
strong: (c) => <Text strong>{c}</Text>,
44
i: (c) => <i>{c}</i>,
45
A: (c) => (
46
<A href="https://doc.cocalc.com/account/ssh.html">{c}</A>
47
),
48
}}
49
/>
50
</Paragraph>
51
</SSHKeyList>
52
</div>
53
);
54
}
55
56