Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 39549
1
# 3rd Party Libraries
2
{Alert, Button, ButtonToolbar, Col, FormControl, FormGroup, Panel, Row, Well} = require('react-bootstrap')
3
immutable = require('immutable')
4
5
# Internal & React Libraries
6
misc = require('smc-util/misc')
7
{defaults, types, required} = misc
8
{React, ReactDOM, rclass, rtypes} = require('./smc-react')
9
{SSHKeyList, SSHKeyAdder} = require('./widget-ssh-keys/main')
10
11
exports.SSHKeysPage = rclass
12
propTypes:
13
account_id : rtypes.string.isRequired
14
ssh_keys : rtypes.immutable.Map
15
16
render_pre_list_message: ->
17
<div style={marginTop:'10px', marginBottom:'10px', color:'#444'}>
18
SSH keys listed here allow you to connect from your computer via
19
SSH to <b><i>all projects</i></b> on which
20
you are an owner or collaborator. Alternatively, set SSH keys that
21
grant access only to a project in the settings for that project.
22
See the SSH part of the settings page in a project for further instructions.
23
</div>
24
25
help: ->
26
<div>
27
To SSH into a project, use the following <span style={color:'#666'}>username@host:</span>
28
<pre>[projectIdWithoutDashes]@ssh.cocalc.com </pre>
29
The project id without dashes can be found in the part of project settings about SSH keys.
30
To SSH between projects, use <pre>[projectIdWithoutDashes]@ssh</pre>
31
</div>
32
33
render: ->
34
<div style={marginTop:'1em'}>
35
<Row>
36
<Col md=8>
37
{@render_pre_list_message()}
38
<SSHKeyList
39
ssh_keys = {@props.ssh_keys}
40
pre_list = {@render_pre_list_message()}
41
delete_key = {@actions('account').delete_ssh_key}
42
help = {@help()} />
43
</Col>
44
<Col md=4>
45
<SSHKeyAdder
46
account_id = {@props.account_id}
47
add_ssh_key = {@actions('account').add_ssh_key}
48
style = {marginBottom:'0px'}
49
/>
50
<div style={marginTop:'10px'}>
51
<a href="https://github.com/sagemathinc/cocalc/wiki/AllAboutProjects#create-ssh-key" target="_blank">How to create SSH Keys...</a>
52
</div>
53
</Col>
54
</Row>
55
</div>
56