1. 检查~/.ssh目录的权限是否为700
2. 检查~/.ssh/authorized_keys文件的权限是否为600
3. 检查~/.ssh/authorized_keys文件中的公钥是否正确
4. 检查/etc/ssh/sshd_config 中的 AuthorizedKeysFile .ssh/authorized_keys 文件名是否正确
5. 检查/root目录的权限 root目录权限为550
aws服务器太慢 ---国内中专
安装步骤
Centos 系统:
yum install -y socat
Debian/Ubuntu 系统:
apt-get update apt-get install -y socat
---------------------
使用方法
转发TCP
nohup socat TCP4-LISTEN:2333,reuseaddr,fork TCP4:233.233.233.233:6666 >> /root/socat.log 2>&1 &
nohup
指的是 后台运行。
TCP4-LI...
aws 服务器 ssh使用密码登陆
我的是RHEL 5
1. sudo su
2.passwd ec2-user
输入两遍密码
3.vim /etc/ssh/sshd_config
修改前PasswordAuthentication no
修改后PasswordAuthentication yes
4.重启ssh服务
service sshd restart
ssh自动断开怎么办?packet_write_wait: Connection to * . * . * . * port 22: Broken pipe
以下方法任选一个
方法1 修改服务器
vim /etc/ssh/sshd_config
最下面插入
ClientAliveInterval 60
ClientAliveInterval 6000 #理论相当于离线100小时 还可以连接
/etc/init.d/sshd restart#centos系统,重启SSH服务命令
/etc/init.d/ssh restart#于Debian / Ubuntu系统,重启SSH服务命令
若提示,/ etc / init.d / sshd没有那个文件或目录,可以使用
ser...
服务器常用命令
记录中
1.scp -p 本地 root@ip:/path
2.chmod -R 700 /path -R 递归子目录
3.chown -R www:www /patt
4./usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf #启动
5./usr/local/nginx/sbin/nginx -s reload #重启
6.useradd user
7.passwd user
8.cat filename | head -n 3000 | ta...
记录一次 nginx+php+mysql
ssh连接错误用
rm -rf ~/.ssh/known_hosts
1.添加用户等等
adduser ***
passwd ***
以后登陆这个用户
# web 用户和组
groupadd www
useradd -g www www -s /sbin/nologin
# 网站目录
mkdir -p /data/htdocs
# 可写目录进行如下设置
# chown -R www:www /path 自己的根目录
# 日志目录
mkdir -p /data/logs
# 创建软件包下载和编译...
Linux下Apache、PHP、MySQL默认安装路径
Apache:
如果采用RPM包安装,安装路径应在 /etc/httpd 目录下
Apache配置文件:/etc/httpd/conf/httpd.conf
Apache模块路径:/usr/sbin/apachectl
Web目录:/var/www/html
如果采用源代码安装,一般默认安装在 /usr/local/apache2 目录下
PHP:
如果采用RPM包安装,安装路径应在 /etc/ 目录下
PHP的配置文件:/etc/php.ini
如果采用源代码安装,一般默认安装在 /usr/local/lib 目录下
PH...