保存时间:2026/4/2 10:40:44
sudo apt update
sudo apt install wine
sudo dpkg --add-architecture i386
sudo mkdir -p /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -np /etc/apt/sources.list.d/https://dl.winehq.org/wine-builds/ubuntu/dists/lunar/winehq-lunar.sources
sudo wget -np /etc/apt/sources.list.d/https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo wget -np /etc/apt/sources.list.d/https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
sudo wget -np /etc/apt/sources.list.d/https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/winehq-bionic.sources
sudo apt install --install-recommends winehq-stable
chmod命令给安装文件赋予可执行权限,例如:chmod 777 <游戏安装文件名>.sh(如果是.sh 格式的安装文件)。./<游戏安装文件名>.sh。winecfg
wine命令来运行游戏,例如:wine /path/to/game.exe(将/path/to/game.exe替换为实际的游戏可执行文件路径)。~/.wine/drive_c/Program Files/GOG Games/游戏名称)。chmod命令给安装文件赋予可执行权限,例如:chmod 777 <安装文件名>.exe(如果是.exe 格式的安装文件)。wine <安装文件名>.exe。按照安装向导的提示进行操作,选择安装路径为你的《英雄无敌 3》GOG 版本的安装目录。#include <QApplication>
#include <QOpenGLWidget>
#include <QOpenGLFunctions>
class OpenGLWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
public:
OpenGLWidget(QWidget *parent = nullptr) : QOpenGLWidget(parent) {}
protected:
void initializeGL() override
{
initializeOpenGLFunctions();
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
}
void paintGL() override
{
glClear(GL_COLOR_BUFFER_BIT);
}
void resizeGL(int width, int height) override
{
glViewport(0, 0, width, height);
}
};
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
OpenGLWidget widget;
widget.show();
return app.exec();
}
| 演员名 | 角色名 |
|---|---|
| 柯俊雄 | 方叔 |
| 周星驰 | 阿星 |
| 吴孟达 | 阿达 |
| 午马 | 老马 |
| 周比利 | 张国华 |
| 成奎安 | 大傻 |
| 沈威 | 师爷威 |
| 何洁 | 阿玲 |
| 罗维 | 黑帮老大 |
| 吴少雄 | Jason |
| 龚嘉玲 | 阿丽(方叔的女儿) |
| 夏志珍 | (角色信息较少提及) |
约 3.3 万字
.ssh/authorized_keys 文件中的公钥匹配。如果匹配成功,用户将被授权登录。.ssh/authorized_keys 文件中。每个用户可以有自己独立的 authorized_keys 文件。ssh-copy-id 等工具将公钥复制到服务器上。/etc/ssh/ 目录下。authorized_keys文件的步骤:ssh username@server_ip
.ssh 目录(如果不存在).ssh 目录,则需要创建一个。可以使用以下命令:mkdir ~/.ssh
.ssh 目录的权限设置正确。通常,权限应为 700(所有者具有读、写和执行权限,其他用户无任何权限):chmod 700 ~/.ssh
authorized_keys 文件(如果不存在)authorized_keys 文件,或者如果已经有公钥需要添加,可以直接将公钥内容复制到文件中。例如,可以使用以下命令创建文件并打开进行编辑:touch ~/.ssh/authorized_keys
vi ~/.ssh/authorized_keys
authorized_keys 文件中,可以将公钥内容复制到文件末尾。确保每一行一个公钥,且公钥内容完整。ssh-copy-id 工具将本地的公钥复制到服务器上。例如,如果要将本地用户的公钥复制到服务器上的 username 用户,可以使用以下命令:ssh-copy-id -i ~/.ssh/id_rsa.pub username@server_ip
authorized_keys 文件的权限设置正确。通常,权限应为 600(所有者具有读、写权限,其他用户无任何权限):chmod 600 ~/.ssh/authorized_keys
authorized_keys 文件,以防意外丢失或损坏。可以将文件复制到其他安全位置或使用备份工具进行备份。authorized_keys 文件,找到要删除的公钥行并删除它。保存文件后,权限设置也需要确保正确。authorized_keys 文件中,以防止未经授权的访问。.ssh 目录和 authorized_keys 文件的未经授权的访问和修改。可以通过限制对服务器的物理访问、使用强密码和防火墙等措施来提高安全性。.ssh directory doesn't exist, create it with the command mkdir.ssh..ssh directory with chmod 700.ssh.authorized_keys file with touch.ssh/authorized_keys.authorized_keys file with chmod 600.ssh/authorized_keys.authorized_keys file with a text editor (such as vi or nano).ssh-keygen to generate a key pair. For example:ssh-keygen -t rsa -b 4096 (you can choose different key types and lengths).ssh username@your_nas_ip_address, where "username" is your Synology NAS user account and "your_nas_ip_address" is the IP address of your NAS./volume1/homes/username..ssh directory doesn't exist, create it with the command mkdir.ssh..ssh directory with chmod 700.ssh.authorized_keys file if it doesn't exist with touch.ssh/authorized_keys.authorized_keys file with chmod 600.ssh/authorized_keys.authorized_keys file with a text editor (such as vi or nano)..pub extension generated in step 2) into the authorized_keys file.ssh-copy-id:ssh-keygen -t rsa -b 4096
ssh-copy-id to copy your public key to the target machine. The command is:ssh-copy-id user@target_ip_address
user with the username on the target machine and target_ip_address with the IP address or hostname of the target Linux machine. You will be prompted for the password of the user on the target machine. Once the command is executed successfully, you can then SSH into the target machine without entering a password using the corresponding private key.scp and editing files:~/.ssh/id_rsa.pub).scp to copy the public key file to the target machine:scp ~/.ssh/id_rsa.pub user@target_ip_address:~
ssh user@target_ip_address
.ssh directory and append its content to the authorized_keys file:mkdir -p ~/.ssh
mv id_rsa.pub ~/.ssh/
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
rm ~/.ssh/id_rsa.pub
.ssh directory and authorized_keys file on the target machine (chmod 700 ~/.ssh and chmod 600 ~/.ssh/authorized_keys)./etc/pam.d/sshd 文件:pam_deny.so that might be blocking authentication attempts without proper configuration./etc/ssh/sshd_config). Make sure that the following settings are correct:PubkeyAuthentication yes: This enables public key authentication.AuthorizedKeysFile.ssh/authorized_keys: This specifies the location of the authorized keys file./etc/pam.d/ 目录下的文件/etc/pam.d/sshd 文件:cat /etc/pam.d/sshd 可以查看该文件的内容。寻找与认证相关的行,例如可能会有 auth required pam_securetty.so 这样的行,这表示在认证过程中会调用 pam_securetty.so 模块。/etc/pam.d/login 用于本地登录等。pam_tally2(如果安装了该工具)pam_tally2 -u username,其中 username 是要检查的用户。这可以帮助确定是否有因多次失败登录而可能触发的 PAM 限制。pam_tally2 -r -u username。/var/log/auth.log 或 /var/log/secure(具体取决于系统):tail -f /var/log/auth.log 可以实时查看日志,观察与 PAM 相关的消息,例如认证成功或失败的消息,以及可能的 PAM 模块的错误信息。pamixer(如果安装了该工具)/var/log/messages or /var/log/syslog: These logs may contain information related to SSH connections and activities.systemctl, you can use the following command:systemctl show -p ExecStart <service_name>
<service_name> with the name of the service you want to inspect. This will display the ExecStart property which contains the command line used to start the service.sshd_config file, you can find the log location by looking for the following line:LogLevel INFO (or some other log level). This doesn't directly specify the log location but indicates the log level.sshd are often found in /var/log/auth.log or /var/log/messages or /var/log/syslog. However, on Synology DSM, as you mentioned earlier, the log locations might be different.grep sshd /var/log/* to search for SSH-related entries in various log files to get an idea of where the logs might be..bash_profile, .bash_login, and .profile in the user's home directory are some of the files that can be executed at login. The order in which they are checked depends on the shell configuration..zprofile, .zshrc, etc.UsePAM yes in sshd_config does not disable public key login.PubkeyAuthentication yes in sshd_config) are in place, public key login will remain functional even with PAM enabled./etc/ssh/ssh_host_rsa_key.pub is the public key of the SSH server and not meant to be used by a client to log in.~/.ssh/id_rsa.pub on the client machine) and adds it to the authorized keys file (~/.ssh/authorized_keys) on the server side to be able to log in via public key authentication.ssh_host_rsa_key.pub cannot be used as a public key for a client to log in to the server.sshd in the following ways:sshd_config file. This is usually located at /etc/ssh/sshd_config.Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com specifies the supported ciphers.KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256 lists the supported key exchange algorithms.ssh -Q cipher to list the supported ciphers.ssh -Q mac to list the supported message authentication codes.ssh -Q kex to list the supported key exchange algorithms.sshd server.ssh-keygen可以指定加密的密钥长度。-b 选项来指定密钥长度。例如,以下命令生成一个 4096 位的 RSA 密钥对:ssh-keygen -t rsa -b 4096
nistp256、nistp384 和 nistp521,它们对应不同的密钥长度。ssh-keygen 生成密钥对时默认密钥长度有所不同:nistp256 曲线,对应 256 位的密钥长度。id_rsa 私钥文件,可以使用 ssh-keygen 工具从私钥生成公钥。以下是具体步骤:ssh-keygen -y -f id_rsa > id_rsa.pub
-y 选项表示从私钥读取并输出公钥。-f id_rsa 指定私钥文件的路径为 id_rsa。> id_rsa.pub 将输出重定向到一个名为 id_rsa.pub 的文件中,这个文件将包含生成的公钥。ssh-rsa、ssh-ed25519 等开头,后面跟着一串字符,是可以添加到服务器的 authorized_keys 文件中以实现基于密钥的 SSH 登录的部分。authorized_keys文件中需要注意以下几点:.ssh目录权限:.ssh目录权限为 700(所有者具有读、写和执行权限,其他用户无任何权限)。例如,可以使用命令chmod 700 ~/.ssh来设置。authorized_keys文件权限:authorized_keys文件权限应设置为 600(所有者具有读、写权限,其他用户无任何权限)。使用命令chmod 600 ~/.ssh/authorized_keys进行设置。权限设置不正确可能导致安全风险。authorized_keys文件之前,最好备份该文件,以防出现问题时可以恢复到之前的状态。.ssh目录和authorized_keys文件的未经授权的访问和修改。可以通过限制对服务器的物理访问、使用强密码和防火墙等措施来提高安全性。/var/log/auth.log或类似位置,具体取决于系统),以确保没有出现错误或异常情况。如果连接失败,可以查看日志以获取更多信息来排查问题。dig命令查找域名时,通过指定特定的服务器参数,可以让dig向指定的 DNS 服务器发送查询请求,相关参数及使用方法如下:@符号后接服务器的 IP 地址或域名来指定要查询的 DNS 服务器。例如,要向 IP 地址为8.8.8.8的谷歌 DNS 服务器查询域名example.com的信息,可以使用以下命令:dig @8.8.8.8 example.com
@参数,各个服务器之间以空格分隔。比如,向8.8.8.8和1.1.1.1两个 DNS 服务器查询example.com,命令如下:dig @8.8.8.8 @1.1.1.1 example.com
dns_servers.txt。然后使用+dnssec选项和-f参数指定该文件,让dig从文件中读取 DNS 服务器列表并查询域名,命令形式如下:dig +dnssec -f dns_servers.txt example.com