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