Skip to content

Instantly share code, notes, and snippets.

View kingoamino's full-sized avatar

Aboumerrouane Mohamed Amine kingoamino

View GitHub Profile
@kingoamino
kingoamino / SFTP Commande
Created April 20, 2020 17:22
SFTP Commande
sftp> help
Available commands:
bye Quit sftp
cd path Change remote directory to 'path'
chgrp grp path Change group of file 'path' to 'grp'
chmod mode path Change permissions of file 'path' to 'mode'
chown own path Change owner of file 'path' to 'own'
df [-hi] [path] Display statistics for current directory or
filesystem containing 'path'
exit Quit sftp
@kingoamino
kingoamino / connexion ssh with key
Created August 11, 2020 15:08
ssh_key Connexion without password
From client machine :
ssh-keygen -t rsa
Create .ssh in remote server fron client :
ssh [email protected] mkdir -p .ssh
Upload key :
cat .ssh/id_rsa.pub | ssh [email protected] 'cat >> .ssh/authorized_keys'
Set Permission :
ssh [email protected] "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
Connexion without password :
ssh [email protected]
@kingoamino
kingoamino / SendMail
Created August 12, 2020 12:46
Send mail centos whith mailx
Installing mailx
yum -y update
yum install -y mailx
We can now start sending e-mails using
create a symbolic link
ln -s /bin/mailx /bin/email
###Set an External SMTP Server to Relay E-Mails