반응형
ec2 인스턴스(Amazon Linux 2)에 stormssh 설치 및 설정하기
stormssh 설치
pip(pip2) 경로 확인
$ which pip3
/usr/bin/pip3
pip3 명령으로 stormssh 설치
pip3 install stormssh
$ /usr/bin/pip3 install stormssh
WARNING: Running pip install with root privileges is generally not a good idea.
Try `pip3 install --user` instead.
Collecting stormssh
Downloading stormssh-0.7.0.tar.gz (90 kB)
|████████████████████████████████| 90 kB 1.9 MB/s
Collecting paramiko
Downloading paramiko-2.7.2-py2.py3-none-any.whl (206 kB)
|████████████████████████████████| 206 kB 7.6 MB/s
Collecting termcolor
Downloading termcolor-1.1.0.tar.gz (3.9 kB)
Collecting flask
Downloading Flask-2.0.2-py3-none-any.whl (95 kB)
|████████████████████████████████| 95 kB 7.7 MB/s
Collecting six
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pynacl>=1.0.1
Downloading PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl (961 kB)
|████████████████████████████████| 961 kB 27.0 MB/s
Collecting bcrypt>=3.1.3
Downloading bcrypt-3.2.0-cp36-abi3-manylinux2010_x86_64.whl (63 kB)
|████████████████████████████████| 63 kB 5.6 MB/s
Collecting cryptography>=2.5
Downloading cryptography-35.0.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB)
|████████████████████████████████| 3.7 MB 37.4 MB/s
Collecting Werkzeug>=2.0
Downloading Werkzeug-2.0.2-py3-none-any.whl (288 kB)
|████████████████████████████████| 288 kB 45.0 MB/s
Collecting itsdangerous>=2.0
Downloading itsdangerous-2.0.1-py3-none-any.whl (18 kB)
Collecting click>=7.1.2
Downloading click-8.0.1-py3-none-any.whl (97 kB)
|████████████████████████████████| 97 kB 11.8 MB/s
Collecting Jinja2>=3.0
Downloading Jinja2-3.0.2-py3-none-any.whl (133 kB)
|████████████████████████████████| 133 kB 45.0 MB/s
Collecting cffi>=1.4.1
Downloading cffi-1.14.6-cp37-cp37m-manylinux1_x86_64.whl (402 kB)
|████████████████████████████████| 402 kB 44.1 MB/s
Collecting importlib-metadata; python_version < "3.8"
Downloading importlib_metadata-4.8.1-py3-none-any.whl (17 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl (31 kB)
Collecting pycparser
Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
|████████████████████████████████| 112 kB 44.0 MB/s
Collecting zipp>=0.5
Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB)
Collecting typing-extensions>=3.6.4; python_version < "3.8"
Downloading typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Using legacy 'setup.py install' for stormssh, since package 'wheel' is not installed.
Using legacy 'setup.py install' for termcolor, since package 'wheel' is not installed.
Installing collected packages: pycparser, cffi, six, pynacl, bcrypt, cryptography, paramiko,
termcolor, Werkzeug, itsdangerous, zipp, typing-extensions, importlib-metadata, click,
MarkupSafe, Jinja2, flask, stormssh
Running setup.py install for termcolor ... done
Running setup.py install for stormssh ... done
Successfully installed Jinja2-3.0.2 MarkupSafe-2.0.1 Werkzeug-2.0.2 bcrypt-3.2.0 cffi-1.14.6
click-8.0.1 cryptography-35.0.0 flask-2.0.2 importlib-metadata-4.8.1 itsdangerous-2.0.1
paramiko-2.7.2 pycparser-2.20 pynacl-1.4.0 six-1.16.0 stormssh-0.7.0 termcolor-1.1.0
typing-extensions-3.10.0.2 zipp-3.6.0
storm 사용법
usage: storm [-h] [-v] COMMAND ...
$ storm -h
usage: storm [-h] [-v] COMMAND ...
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
commands:
COMMAND
version prints the working storm(ssh) version.
add Adds a new entry to sshconfig.
clone Clone an entry to the sshconfig.
move Move an entry to the sshconfig.
edit Edits the related entry in ssh config.
update Enhanced version of the edit command featuring multiple
edits using regular expressions to match entries
delete Deletes a single host.
list Lists all hosts from ssh config.
search Searches entries by given search text.
delete_all Deletes all hosts from ssh config.
backup Backups the main ssh configuration into target file.
web Starts the web UI.
storm is a command line tool to manage ssh connections.
get more information at: github.com/emre/storm
storm 버전 확인
storm --version
$ storm --version
0.7.0
stormssh 설정
호스트 추가
storm add web01 ec2-user@10.51.3.81:22 --id_file=~/aws/mykey.pem
$ storm add web01 ec2-user@10.51.3.81:22 --id_file=~/aws/mykey.pem
success web01 added to your ssh config. you can connect it by typing "ssh web01".
호스트 검색
storm search web
$ storm search web
Listing results for web:
web01 -> ec2-user@10.51.3.81:22
storm 명령으로 등록한 웹 서버(web01)에 접근
ssh web01
$ ssh web01
Last login: Wed Oct 6 15:05:20 2021 from ip-10-11-92-92.ap-northeast-2.compute.internal
__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-2/
8 package(s) needed for security, out of 22 available
Run "sudo yum update" to apply all updates.
ec2-user@web01:~$
참고URL
- github : https://stormssh.readthedocs.io/en/latest/index.html
728x90
반응형
'퍼블릭 클라우드' 카테고리의 다른 글
[AWS] Amazon EC2 Auto Scaling (0) | 2021.10.08 |
---|---|
AWS EC2 인스턴스(Amazon Linux 2)에 Packer를 설치하기 (0) | 2021.10.08 |
Amazon EC2 인스턴스에 정적 호스트 이름을 할당하는 방법 (0) | 2021.10.06 |
AWS 리소스에 태그(Tag)를 추가하는 방법 (0) | 2021.10.05 |
AWS CLI로 액세스 키(Access Key, Secret Access Key) 설정 (0) | 2021.10.05 |