OpenSSH : Password Authentication2021/08/17 |
Configure SSH Server to manage a server from the remore computer. SSH uses 22/TCP.
|
|
[1] | Password Authentication for OpenSSH Server on Debian is enabled by default, so it's possible to login without changing any settings. Furthermore, root account is prohibited Password Authentication by default with [PermitRootLogin prohibit-password], so default setting is good for use. But if you prohibit root login all, change like follows. |
root@dlp:~#
apt -y install openssh-server
root@dlp:~#
vi /etc/ssh/sshd_config # line 34 : uncomment and change to [no] PermitRootLogin no
systemctl restart ssh |
SSH Client : Debian
|
Configure SSH Client for Debian.
|
|
[2] | Install SSH Client. |
root@client:~# apt -y install openssh-client
|
[3] | Connect to the SSH server with a common user. |
# ssh [username@hostname or IP address] root@client:~# ssh debian@dlp.srv.world
The authenticity of host 'dlp.srv.world (10.0.0.30)' can't be established.
ECDSA key fingerprint is SHA256:v+78HzsV/tLAYycjkp2snBRU1VI5YU3xW8gpiQyCnwQ.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'dlp.srv.world,10.0.0.30' (ECDSA) to the list of known hosts.
debian@dlp.srv.world's password:
Linux dlp.srv.world 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64
.....
.....
debian@dlp:~$ # logined |
[4] | It's possible to execute commands on remote Host with SSH like follows. |
# for example, run [cat /etc/passwd] debian@client:~$ ssh debian@dlp.srv.world "cat /etc/passwd" debian@dlp.srv.world's password: root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin ..... ..... |
SSH Client : Windows #1
|
Configure SSH Client for Windows.
|
|
[5] |
Download a SSH Client software for Windows.
Install and start Putty, then Input your server's Hostname or IP address on [Host name] field and Click [Open] button to connect.
On this example, it shows Putty (www.chiark.greenend.org.uk/~sgtatham/putty/). |
[6] | After successfully passed authentication, it's possible to login and operate Fedora server from remote computer. |
SSH Client : Windows #2
|
[7] | On Windows 10 version 1803 or later, OpenSSH Client has been implemented as a Windows feature, so it's possible to use [ssh] command on PowerShell or Command Prompt without Putty or other 3rd party SSH softwares. It's the same usage because it's the OpenSSH Client, refer to [3], [4] section. |
Sponsored Link |
|