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