The Linux software for building an SSH server.
SSH 서버를 구축하는 리눅스 소프트웨어.
1. Feature 특징
01. Most used software for SSH.
SSH를 위해 가장 많이 사용되는 소프트웨어.
SSH를 위해 가장 많이 사용되는 소프트웨어.
2. How to install 설치 방법
01. Check if it is installed. If it is installed, you can see the following message.
설치 여부 확인. 만약 설치가 되어있다면 아래와 같은 메시지를 볼 수 있다.
설치 여부 확인. 만약 설치가 되어있다면 아래와 같은 메시지를 볼 수 있다.
$ systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab
Active: active (running) since Sat 2018-11-10 22:30:02 PST; 31s ago
Process: 4501 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 4504 (sshd)
CGroup: /system.slice/ssh.service
└─4504 /usr/sbin/sshd -D
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab
Active: active (running) since Sat 2018-11-10 22:30:02 PST; 31s ago
Process: 4501 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 4504 (sshd)
CGroup: /system.slice/ssh.service
└─4504 /usr/sbin/sshd -D
02. Install using apt-get.
apt-get을 사용하여 설치.
apt-get을 사용하여 설치.
$ apt-get install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
$ systemctl restart ssh
Reading package lists... Done
Building dependency tree
Reading state information... Done
- Omission 중략 -
$ systemctl restart ssh
3. How to use 사용법
❑ Start/restart/stop.
시작/재시작/중지.
시작/재시작/중지.
$ systemctl start ssh
$ systemctl restart ssh
$ systemctl stop ssh
$ systemctl restart ssh
$ systemctl stop ssh
❑ Status.
상태.
상태.
$ systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab
Active: inactive (dead) since Sat 2018-11-10 23:19:10 PST; 2s ago
Process: 4796 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=0/SU
Process: 4795 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 4796 (code=exited, status=0/SUCCESS)
Nov 10 23:16:27 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server.
Nov 10 23:16:27 ubuntu systemd[1]: Starting OpenBSD Secure Shell server...
Nov 10 23:16:27 ubuntu sshd[4796]: Server listening on 0.0.0.0 port 22.
Nov 10 23:16:27 ubuntu sshd[4796]: Server listening on :: port 22.
Nov 10 23:16:27 ubuntu systemd[1]: Started OpenBSD Secure Shell server.
Nov 10 23:19:10 ubuntu systemd[1]: Stopping OpenBSD Secure Shell server...
Nov 10 23:19:10 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server.
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab
Active: inactive (dead) since Sat 2018-11-10 23:19:10 PST; 2s ago
Process: 4796 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=0/SU
Process: 4795 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 4796 (code=exited, status=0/SUCCESS)
Nov 10 23:16:27 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server.
Nov 10 23:16:27 ubuntu systemd[1]: Starting OpenBSD Secure Shell server...
Nov 10 23:16:27 ubuntu sshd[4796]: Server listening on 0.0.0.0 port 22.
Nov 10 23:16:27 ubuntu sshd[4796]: Server listening on :: port 22.
Nov 10 23:16:27 ubuntu systemd[1]: Started OpenBSD Secure Shell server.
Nov 10 23:19:10 ubuntu systemd[1]: Stopping OpenBSD Secure Shell server...
Nov 10 23:19:10 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server.
❑ Enable login as root.
루트 로그인 활성화.
루트 로그인 활성화.
$ vi /etc/ssh/sshd_config
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
$ systemctl restart ssh
- Omission 중략 -
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
- Omission 중략 -
$ systemctl restart ssh
Check environment 점검 환경 | |||
O S | Ubuntu 16.04(64 bits) | CPU | Intel i7 |
SHELL | GNU bash (4.3.48) | RAM | 1 GB |