• Home
  • WP tuts
  • Hosting talk
    • Free hosting
    • Cheap Hosting
    • comparison cloud , vps, shared, wordpress
    • managed wordpress hosting
    • managed cloud hosting
  • Speed up wordpress
  • Pc world
  • Services
  • About Me

RAaz Kumar .com

wordpress tutorials seo hosting etc

connect to server by SSH client Putty SFTP client winscp LAMP, LEMP nginx apache etc linux

 

 

 

#1 Download SSH client Putty & Putty gen

puttygen optional to generate keys in local machine.

 

1.2 Obtain IP Address  & root Password of the server

if not, you can add ssh Key by their dashboard like google cloud, Digital ocean etc.

or you can directly login without any credentials from hosting provider dashboard with their building ssh client.

 

SSH connection through putty using root & password

 

enter your ip address and select port as 22, (21 for fTp).

Once its asks name enter root (any username if it is has root privileges)

then asks you enter the password.

once you login to

yournamme@machine# will appears

but you need to learn linux commands here

 

Generating SSH keys & pairing between remote machine

 

#1. Generating SSH keys on remote server

ssh-keygen -t rsa

or you can add encryption strength 1024, 2048, 4096 etc

ssh-keygen -t rsa -b 4096
root@instance-1:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:TooN6YdwYieraczFb+uL0wYxuEgcXsNPpuQK4OPxM9U root@instance-1
The key's randomart image is:
+---[RSA 2048]----+
|  .              |
|.. = o           |
|= * * .          |
|.O = + E         |
|= % O   S        |
|.= / = +         |
|o o X + .        |
| * ..*           |
|+  .=+o          |
+----[SHA256]-----+

 

private key location in /root/.ssh/id_rsa.
public key location  /root/.ssh/id_rsa.pub.
press enter thrice to create ssh keygen without password .

#2 Connecting to Remote server & copying public key

Note: public key at Target machine (server)

Private key at source machine (local)

a. connection

ssh user@remoteip

ssh root@192.168.0.1

it asks root password , once you enter the root password.

it will allow to communicate.

Copying Public key to Authorized_keys .

we use cat command to append at end of the file or you can manually edit using nano.

 

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

Beware: you must file path.

 

Then You may follow syncing & copying between 2 servers.

 

SSH Folder & keys file permission

File permissions should be

750 for folder &

640 for files.

 

How to use ssh-keygen to generate a new SSH key

 

  1. download puttygen
  2. click on generate keys
  3. just drag by mouse it will generate public & priate keys.

 

 

Copy the Prite keys to root/.ssh/authrized_keys

 

Manual through sftp client winscp

command line by nano command.

 

Restart SSHD if needed

sudo systemctl restart sshd.service

 

Enable / disable root password login in SSH

 

nano /etc/ssh/sshd_config

allow root password login = yes

comment or uncomment change no or year depending on your need.

its better to turn off root password to avoid attacks.

 

Download winscp SFtp as for file Transfers

 

we can do file transfer by SCP  & CP command . But the winscp gies a look of file manager just like cpanel.

  1. Download & install winscp.
  2. Open winscp and click add new site.
  3. Enter Ip address & Port
  4. Enter Username
  5. Password leave it blank if you already added Public key at server .
  6. click on Advanced and advanced>>SSH>> authenticate key browse for the private key and Save.
  7. or if you not yet added the public to the serer.
  8. by hosting provider dashboard ft gce,digital ocean etc
  9. login with root & password add key check connection then disable password
  10. Hosting provider default ssh client

Copy the Private key from server or generate private key pair form puttygen.

 

putty integration with winscp

 

download and install putty , then winscp automatically uses for command line interface.

winscp+putty (must).

other popular SFTP & FTP clients for windows

Filezilla etc

 

Creating SSH Keys for non root users

 

user able to login to /home/user/

after user login

generate key

the ssh directory basically already created in user directory.

.ssh

/home/user/.ssh/keys

root@instance-1:/home# cd ubuntu

root@instance-1:/home/ubuntu# ls -a
.  ..  .bash_logout  .bashrc  .profile  .ssh

root@instance-1:/home/ubuntu# cd .ssh
root@instance-1:/home/ubuntu/.ssh# ls -a
.  ..  authorized_keys
root@instance-1:/home/ubuntu/.ssh#

 

linux users & group management

 

 

////////////////////            ////

 

Troubleshooting

 

Incorrect public & private keys for User

 

Reasons: File Permissions  assign  directory & files  with Correct permissions.

Restrict usage to local computer
sudo nano /home/ssh-user/.ssh/authorized_keys
add this line very beginning of the file
from=”127.0.0.1″

VSFTPD FTP client installation

 

Install VSFTPD on the server

how to configure ftp server in linux centos
 
Step 1 Install VSFTD
sudo yum install vsftpd
or
Debian sudo apt-get install vsftpd
and then install ftp client
sudo apt-get install ftp
or
sudo yum install ftp
 
Step 2 configure vsftp
 
Open the config file 
 
sudo vi /etc/vsftpd/vsftpd.conf
 
Edit below lines
anonymous_enable=NO
 
 
local_enable=YES
 
and uncomment this line
 
chroot_local_user=YES
 (this command prevents users to access another directory)
 
Uncomment this 
chroot_list_file=/etc/vsftpd.chroot_list  
 
add fto username to get root privileges
 
 
Response: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
 
echo ‘allow_writeable_chroot=YES’ >> /etc/vsftpd/vsftpd.conf
 
systemctl restart vsftpd
 
how to check ssh version in linux
-A INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT to iptbles
 
restart
 
systemctl restart vsftpd.service
systemctl enable vsftpd.service
sudo service vsftpd restart
 
 
 
ensure that vsftpd working 
 
chkconfig vsftpd on
 
 
Add FTP Port 21]
 
firewall-cmd –permanent –add-port=21/tcp
 
firewall-cmd –permanent –add-service=ftp
Restart firewall
firewall-cmd –reload
update boolean values for selinux
setsebool -P ftp_home_dir on  (if selinux)

Related topics:

  1. install wordpress via command line apache nginx ubuntu debian
  2. 3 Ways (SCP, rsync, Sftp) linux server migration between two remote server apache nginx
  3. ubuntu tutorials installation download issues etc
  4. install lemp Linux, Nginx 1.15.12, MySQL 8, PHP fpm 7.3 on Ubuntu 18.04
  5. RaazKumar.com #hosting #wordpress #linux #nginx #apache

Ask a Question: Cancel reply

Your email address will not be published. Required fields are marked *

17 + 9 =

tutorials

  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • Devops Syllabus topics PDF
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • how to create a website free of cost on google
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • nginx server tutorials (installation, configuration, performance tuning, security)
  • Vivek Bindra Videos Transcription (business strategy)
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • MySQL Tutorial (create,connect database, update tables, export etc) Documentation & TIPS
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • ubuntu tutorials installation download issues etc
  • Php tutorials
  • HTML & CSS Tutorials
  • Core Java Tutorial Free online
  • Linux sysadmin tutorials linux system administrator
  • apache server tutorial (install,config, performance tuning, security, error handling)
    • what is If-Modified-Since HTTP header how to add to Wordpress website
    • htaccess tutorial tips for wordpress #redirect #leverage browser cache #Gzip #KeepAlive
    • apache modules list (explained, enable disable)
    • connect to server by SSH client Putty SFTP client winscp LAMP, LEMP nginx apache etc linux
    • Lamp stack install on Ubuntu 20.4 LTS apache, mysql, php 7.4(Debian 9 & Ubuntu 18.04 lts)
    • apache performance tuning mpm-worker vs prefork vs event modules
    • enable caching in apache server (mod cache disk cache) vs fastcgi cache
    • how to enable KeepAlive connections in apache nginx wordpress
    • Cache control Header & expires headers How to set Properly
    • apache2 conf sample explained apache configuration file modules etc

 

PUBG Mobile Tips & Tricks

free fire how to play (a-z guide) guns, tips & tricks etc

Windows 10 tips & tricks

Pagespeed optimization

Pc building tips & tricks

nginx server tutorials

apache server tutorials

linux sysadmin tutorials

mysql Commands list pdf

Android studio tutorials

Gaming/ streaming tips

Airtel dth channel list

 

wordpress

 

Top 5  WP Google Analytics Plugins

WP Backup Plugins

Wp Comment Plugins

Top wordpress Security Plugins

WP Seo Plugins

WP Caching Plugins

Best Adsense Plugins for WordPress

Wp social Sharing Plugins

autoshare social media plugins

WP speed Optimization Plugins

Speedup WordPress google Score

More Wp tuts

Server Admin Cloud

 

Installing Nginx LEMP On ubuntu

Installing apache Lamp ubuntu

nginx fastcgi cache enable

php – fpm install  & Configuration

Opcache install & Configure

php -fpm pool manager explained

Mysql Install & Configuration

Redis Object cache install & configure

 

Nginx as Reverse Proxy and Load balancer

Load Balance / auto scaling in google cloud

Linux Commands PDF

Mysql Commands Pdf

Letsencrypt tutorial

mysqldump export & import 

Pagespeed Module install & configure

nginx.conf best file

mysql.conf best file

upgrade ubuntu

© 2021 - All Rights Reserved Disclaimer & Privacy Policy