Friday 24 January 2020

Passwordless SCP/SSH/SFTP from linux to windows server



1. Install OpenSSH-server and client with PowerShell command

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

Start-Service sshd

Set-Service -Name sshd -StartupType 'Automatic'


https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse

2. Generate public and private key on  linux server with below command

ssh-keygen -t rsa

3. copy content of /<user_home_direcotry>/.ssh/id_rsa.pub

4. Paste the copied data inside windows server C:\Users\<Administrator>\.ssh\authorized_keys

5. Edit C:\Windows\System32\OpenSSH/sshd_config_default and add below lines at bottom


Match User <administrator>
       AuthorizedKeysFile C:\Users\<Administrator>\.ssh\authorized_keys


6. Restart OpenSSH SSH Server Service.

Restart-Service sshd

Friday 18 October 2019

Install Mariadb/Mysql 10.3 on centos8

yum install mariadb mariadb-server

systemctl enable mariadb

systemctl start mariadb

Tuesday 17 September 2019

sync/change/update time with NTP server on windows

net stop w32time

w32tm /config /syncfromflags:manual /manualpeerlist:"time.windows.com, 0.us.pool.ntp.org,1.us.pool.ntp.org,2.us.pool.ntp.org,3.us.pool.ntp.org"

w32tm /config /reliable:yes

net start w32time

w32tm /query /configuration