第1年11月03日 linux服务器配置

1.

其中这两项PubkeyAuthentication yes   和PasswordAuthentication no的值都要为yes,即公钥认证和密码认证都要为yes,因为我连接的方式是通过这两种方式来连接的,

 

1
2
3
4
5
[root@iZ2ze97cgcumk8opq8h8Z .ssh]# egrep "PubkeyAuthentication" /etc/ssh/sshd_config
#PubkeyAuthentication yes
PubkeyAuthentication yes
[root@iZ2ze97cgcuopqm28h8Z .ssh]# egrep "PasswordAuthentication" /etc/ssh/sshd_config
PasswordAuthentication no

 

https://www.cnblogs.com/dadonggg/p/7520249.html

 

2.

在服务器端SSH配置更改

服务器的SSH配置文件通常位于/etc/ssh/sshd_config。

如果打开此文件,您将在此处找到两个感兴趣的参数:

ClientAliveInterval: 这是不活动时间段,在该时间段后,服务器将向ssh连接的客户端发送活动消息。

ClientAliveCountMax:这是服务器将尝试发送活动消息的次数。

假设您将其设置ClientAliveInterval为200秒,并将ClientAliveCountMax其设置为3。这意味着服务器将在200秒后发送活动消息。如果客户端没有任何活动,它将在400秒后再次发送活动消息。客户端没有响应/活动,并且在600秒后发送了另一个活动消息。此后(600秒),SSH连接断开。

您可以/etc/ssh/sshd_config在喜欢的基于终端的文本编辑器(如Vim)中编辑文件。查找ClientAliveInterval和ClientAliveCountMax条目。删除行开头的#键,并为其指定适当的值。

 

https://www.a5idc.net/helpview_1226.html

 

systemctl restart sshd

 

https://www.cnblogs.com/andydao/p/15007793.html

 

 

3.sftp

/etc/ssh/sshd_config

Subsystem   sftp    internal-sftp


 sudo sshd -t
 
sudo systemctl restart sshd

sftp -P 2222 sftpUser@127.0.0.1

https://www.jianshu.com/p/cc4750f9a8dd

 

4.yarn

node版本太低,先移除

yum install yarn

nodejs-8.17.0-1nodesource.x86_64.rpm   

 

wget https://npm.taobao.org/mirrors/node/v12.18.3/node-v12.18.3-linux-x64.tar.xz
https://www.cnblogs.com/baby123/p/6955396.html

 

curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo

 

https://www.cnblogs.com/zjllearn/p/13670115.html

 5.nginx 目录

/etc/nginx/nginx.conf

https://www.cnblogs.com/jeffhong99/p/11362361.html

 

posted @ 2021-11-02 13:00  lianhuaren  阅读(58)  评论(0编辑  收藏  举报