diagnosis
smtp-auth
from smtplib import SMTP
smtp = SMTP('smtp.ecample.com')
smtp.login('<user>','<pass>')
(235, b'2.7.0 Authentication successful')
user/group
menber add to group
usermod -aG [GROUPS] [USER]
filesystem
Extend xfs file system
Install tools
yum install xfsprogs
Then use the following command, substituting the mount point of the file system (XFS file systems must be mounted to resize them):
xfs_growfs -d /mnt/xvdf
cron / anacron
anacron
/etc/anacrontab
anacron ctrl /etc/cron.(dayly|weekly|monthly)
/etc/cron.hourly
is kicked by cron.
/etc/cron.d/0houry
-> /etc/cron.houry
.
cron.houry
= 01 * * * * root run-parts /etc/cron.hourly
ssh
Port forwarding
To [server]'s 80
ssh -L 9001:localhost:80 [server]
To other server's 80.
ssh -L 9001:[other-server]:80 [server]
Reverse port forwarding
ssh -R 8000:localhost:8000 [server]
[server] listen 8000 and forward local-pc's 8000.
This command [server] listen localhost:8000 only. If you want to listen 0.0.0.0[server], edit 'sshd_conf' and reboot sshd daemon.
http://superuser.com/questions/588591/how-to-make-ssh-tunnel-open-to-public
GatewayPorts yes
and connect with -g
option.
ssh -g -R 8000:[other-server]:8000 [server]
apply sysctl.d
for amzn-linux
. /etc/init.d/functions
apply_sysctl
delete file start with '-'
use --
option.
touch -- -hoge
cp -- -hoge hoge
rm -- -hoge