SSH/SSHD/OpenSSH in CentOS/Redhat Linux

Experiment with SSH/SSHD/OpenSSH in CentOS/Redhat Linux

Yes, from  my history (Probably a review for the technical people, who already knew these sometimes in the past)

461 echo "dec 24th, 2017"
462 vim /etc/ssh/sshd_config

463 echo "SSH Related Commands"
464 scp -> secure copy
465 tscp -> secure copy for windows
466 sftp -> secure ftp
467 slogin -> secure login - alternative to rlogin
468 ssh -> provides secure telnet, secure rlogin
469 ssh-add -> provides DSA/ECDSA/RSA characteristics to ssh-agent
470 ssh-agent

 

471 ssh-agent output
472 SSH_AUTH_SOCK=/tmp/ssh-DQP6FzPIZvG7/agent.3903; export SSH_AUTH_SOCK;
473 SSH_AGENT_PID=3904; export SSH_AGENT_PID;
474 echo Agent pid 3904;

475 ssh-copy-id -> copy keys to remote system (manual copy is also an option, you can use scp as well)
476 ssh-keygen: generates public and private key

 

477 SSH components: the server with the SSH daemon. The client with scp, sftp, slogin, ssh, ssh-copy-id. and the openssh packgae itself to provide ssh-ketgen and different modules and libraries.
478 ssh-agent : authentication agent that also holds private keys
479 cat /etc/ssh/sshd_config > system wide ssh config file
480 cat /etc/ssh/sshd_config

481 cat /etc/ssh/ssh_config
482 vim /etc/ssh/ssh_config
483 vim /etc/ssh/sshd_config
484 cat /etc/sysconfig/sshd

485 cat /etc/sysconfig/sshd -> server configuration file
486 cat /var/log/secure
487 cat /var/log/secure -> related messages

488 cat /etc/passwd
489 useradd user1
490 passwd user1
491 su user1
492 useradd user100
493 passwd user100
494 su user100

496 ipaddr
497 ip addr
498 nmtui
499 ip addr
500 su user1

501 exit
502 history > ssh_history.txt
503 history

 


 

after switching to user100

 

ssh 192.168.12.45
4 ssh 192.168.12.45 /bin/ls -la

exit


cd ~

14 touch file1
15 scp file1 192.168.12.45:/home/user100
16 sftp 192.168.12.45

Series Navigation<< Linux: LVM : Logical Volume Manager : Multiple Hard Disk and Partition and Volume ManagementTCP Wrappers in Linux/CentOS/Redhat/Fedora >>

Permanent link to this article: http://bangla.salearningschool.com/recent-posts/ssh-sshd-openssh-centos-redhat-linux/

%d bloggers like this: