Reference
https://codechacha.com/ja/ubuntu-install-openssh/
https://pinkwink.kr/1318?category=709117
# SERVER
hpc@hpc-ubuntu:~$ sudo apt update
hpc@hpc-ubuntu:~$ sudo apt install openssh-server
hpc@hpc-ubuntu:~$ sudo systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-09-22 10:15:36 JST; 25s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 5349 (sshd)
Tasks: 1 (limit: 76692)
Memory: 1.0M
CGroup: /system.slice/ssh.service
└─5349 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
9月 22 10:15:36 hpc-ubuntu systemd[1]: Starting OpenBSD Secure Shell server...
9月 22 10:15:36 hpc-ubuntu sshd[5349]: Server listening on 0.0.0.0 port 22.
9月 22 10:15:36 hpc-ubuntu sshd[5349]: Server listening on :: port 22.
9月 22 10:15:36 hpc-ubuntu systemd[1]: Started OpenBSD Secure Shell server.
hpc@hpc-ubuntu:~$ sudo systemctl enable ssh
Synchronizing state of ssh.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ssh
hpc@hpc-ubuntu:~$ sudo systemctl start ssh
# Client with VSCODE
##install extension of remote - ssh
##Ctrl + Shift + P -> Remote SSH: Add New SSH Host.. ->
Input Username@IP address and press 'Enter'
## Ctrl + Shift + P -> Remote SSH: Connect to Host.. ->
select your client ID
# Client with terminal
hpc@hpc-ubuntu:~$ sudo apt-get install openssh-client
hpc@hpc-ubuntu:~$ ssh username@xxx.xxx.xxx.xxx
username@xxx.xxx.xxx.xxx's password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.15.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
2 updates can be applied immediately.
To see these additional updates run: apt list --upgradable
Your Hardware Enablement Stack (HWE) is supported until April 2025.
sip2@sip2-2021:~$
sip2@sip2-2021:~$ ip a
コメント
コメントを投稿