Skip to content

Commit ea4db34

Browse files
committed
Adding licensing information and bumping BotoCore minimum version to
match public launch
1 parent 6f2baed commit ea4db34

23 files changed

+347
-3
lines changed

README.rst

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
=============
2+
ec2-connect-cli
3+
=============
4+
5+
This is a Python client for accessing EC2 instances via AWS EC2 Managed SSH. This client generates a short-lived RSA
6+
keypair and pushes it through the AWS Managed SSH service, then uses the key to connect to the target EC2 instance.
7+
8+
This client supports all standard ssh operations with the `mssh` command and all standard sftp operations with the
9+
`msftp` command.
10+
11+
The ec2-connect-cli package works on Python versions:
12+
13+
* 2.6.x and greater
14+
* 2.7.x and greater
15+
* 3.3.x and greater
16+
* 3.4.x and greater
17+
* 3.5.x and greater
18+
* 3.6.x and greater
19+
20+
------------
21+
Installation
22+
------------
23+
24+
The easiest way to install ec2-connect-cli is to use `pip`_::
25+
26+
$ pip install ec2instanceconnectcli
27+
28+
or, if you are not installing in a ``virtualenv``::
29+
30+
$ sudo pip install ec2instanceconnectcli
31+
32+
If you have the ec2-connect-cli installed and want to upgrade to the latest version you can run::
33+
34+
$ pip install --upgrade ec2instanceconnectcli
35+
36+
This will install the ec2instanceconnectcli package as well as all dependencies. Once you have the ec2instanceconnectcli
37+
directory structure on your workstation, you can just run::
38+
39+
$ cd <path_to_ec2instanceconnectcli>
40+
$ python setup.py install
41+
42+
---------------
43+
Getting Started
44+
---------------
45+
46+
Before using ec2-connect-cli, you need to tell it about your AWS credentials. This can be done in the same way
47+
as you would configure `aws-cli`_
48+
49+
^^^^^^^^
50+
Examples
51+
^^^^^^^^
52+
53+
Connect to an instance and open a shell
54+
55+
$ mssh [instance id]
56+
57+
Connect to an instance by DNS name as user "my-user" and run the command "ls"
58+
59+
$ mssh my-user@ec2-[ec2 IP].us-east-1.compute.amazonaws.com -t [instance id] ls
60+
61+
Run sftp against instance using the AWS CLI profile "otherprofile" and transferring my-file
62+
63+
$ msftp -pr otherprofile [instance id]:my-file
64+
65+
.. _pip: http://www.pip-installer.org/en/latest/
66+
.. _aws-cli: https://github.com/aws/aws-cli

bin/msftp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
#!/usr/bin/env python
2+
3+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License"). You
6+
# may not use this file except in compliance with the License. A copy of
7+
# the License is located at
8+
#
9+
# http://aws.amazon.com/apache2.0/
10+
#
11+
# or in the "license" file accompanying this file. This file is
12+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
13+
# ANY KIND, either express or implied. See the License for the specific
14+
# language governing permissions and limitations under the License.
15+
216
import sys
317
from ec2instanceconnectcli import mops
418

bin/mssh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
#!/usr/bin/env python
2+
3+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License"). You
6+
# may not use this file except in compliance with the License. A copy of
7+
# the License is located at
8+
#
9+
# http://aws.amazon.com/apache2.0/
10+
#
11+
# or in the "license" file accompanying this file. This file is
12+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
13+
# ANY KIND, either express or implied. See the License for the specific
14+
# language governing permissions and limitations under the License.
15+
216
import sys
317
from ec2instanceconnectcli import mops
418

doc/README.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
==========================
2+
Building The Documentation
3+
==========================
4+
5+
**Note: This is not complete and currently only does basic doc generation.**
6+
7+
Before building the documentation, make sure you have Python 2.7,
8+
the ec2instanceconnectcli, and all the necessary dependencies installed. You can
9+
install dependencies by using the requirements-docs.txt file at the
10+
root of this repo::
11+
12+
pip install -r requirements-docs.txt
13+
14+
The process for building the documentation is:
15+
16+
* Run ``make html`` which will build all of the HTML documentation
17+
into the ``build/html`` directory.
18+
19+
* Run ``make man`` which will build all of the man pages into
20+
``../doc/man/man1``. These files are included in the source
21+
distribution and installed by ``python setup.py install``.
22+
23+
* Run ``make text`` which will build all of the text pages that
24+
are used for interactive help on the Windows platform. These files
25+
are included in the source distribution and installed by
26+
``python setup.py install``.
27+
28+
You can perform all of these tasks by running ``make all`` in this
29+
directory. If you have previously built the documentation and want
30+
to regenerate it, run ``make clean`` first.

ec2instanceconnectcli/EC2InstanceConnectCLI.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
114
import logging
215
import sys
316
import time

ec2instanceconnectcli/EC2InstanceConnectCommand.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
114
class EC2InstanceConnectCommand(object):
215
"""
316
Generates commands relevant for the client.

ec2instanceconnectcli/EC2InstanceConnectKey.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
114
import os
215
import tempfile
316

ec2instanceconnectcli/EC2InstanceConnectLogger.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
114
import logging
215

316
class EC2InstanceConnectLogger(object):

ec2instanceconnectcli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of

ec2instanceconnectcli/ec2_util.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
114
from argparse import Namespace
215
import sys
316

0 commit comments

Comments
 (0)