Wednesday, July 1, 2015

SSH Server CentOS 7

Configure SSH Server - Password Authentification

Configure SSH Server to manage a server from the remore computer. SSH uses 22/TCP

SSHd is installed even if you installed CentOS with "Minimal Install", so it's not necessarry to install new packages. Furthermore, SSHd is set auto-start setting by default, so it's possible to login without chainging ant settings. But it had better to change for security settings like follows





[root@dlp ~]#
vi /etc/ssh/sshd_config
# line 42: uncomment and change ( prohibit root login remotely )

PermitRootLogin
no
# line 65: uncomment

PermitEmptyPasswords no
PasswordAuthentication yes
[root@dlp ~]# /etc/rc.d/init.d/sshd restart 

Configure SSH Client - CentOS

Configure SSH Client of CentOS.

Install SSH Client.
[root@client ~]# 
yum -y install openssh-clients

Connect to the SSH server with a common user
# ssh [username@hostname or IP address]

[root@client ~]# 
ssh cent@dlp.server.world 

The authenticity of host 'dlp.server.world (<no hostip for proxy command>)' can't be established.
ECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:60:90:d8.
Are you sure you want to continue connecting (yes/no)? 
yes

Warning: Permanently added 'dlp.server.world' (ECDSA) to the list of known hosts.
cent@dlp.server.world's password: 
# password of the user

[cent@dlp ~]$ 


It's possbile to execute commands on remote Host with adding commands to ssh command
# for example, open /etc/passwd on remote host

[cent@client ~]$ 
ssh cent@dlp.server.world "cat /etc/passwd" 

cent@dlp.server.world's password:
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
...
...
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin


Configure SSH Client : Windows
Get a SSH Client for Windows. This example shows to use Putty like follows.
Input your server's IP address and Click 'Open' button.



After authentication on SSH server, it's possible to login remotely with SSH


Related Posts:

  • A Basic MySQL Tutorial About MySQL MySQL is an open source database management software that helps users store, organize, and retrieve data. It is a very powerful program … Read More
  • DNS Server - 1 Install BINDInstall BIND to configure DNS server which resolves domain name or IP address. BIND uses 53/TCP,UDP Install BIND. [root@dlp ~]# yum -y inst… Read More
  • DNS Server - 2 Set ZoneCreate zone files that servers resolve IP address from domain name For internal zone This example uses internal address[10.0.0.0/24], domain name[ser… Read More
  • How To Setup Your Own VPN With PPTP Intro One of the commonly asked questions from our users is how to add another IP address to their server. You can assign your own private IP addres… Read More
  • DNS Server - 3 Start BindStart BIND. [root@dlp ~]# systemctl start named  [root@dlp ~]# systemctl enable named Change DNS settings that the server … Read More

0 comments:

Post a Comment