我可以通过 SSH 连接到局域网中的另一台 Ubuntu 机器。在两台 PC 上,我都安装了openssh-server, 但是在另一台 Ubuntu 计算机上,我无法通过 SSH 连接到我的 PC,并且出现此错误:
主机密钥验证失败...
我有一个生产服务器。要登录到服务器,我必须使用一个.ppk文件。
如何使用 Ubuntu 终端和.ppk文件登录?
我试过这个:
ssh -i location/file.ppk username@server-ip
Run Code Online (Sandbox Code Playgroud)
但它显示一条错误消息。
我/etc/iptables/filter在 Ubuntu 中对 iptables 配置文件进行了更改,并想重新加载它们。我阅读了手册页,也用谷歌搜索但找不到信息。任何帮助将不胜感激。
我是一名开发人员,我通常使用我的 GPG 密钥签署我的 Git 提交。我已经能够让 GPG 代理在 OSX 上正常工作,因此它每天只要求我输入一次密码,但是我在 Ubuntu 16.04 上遇到了同样的问题。
这是我在做什么:
然后我去提交它们 ( git commit),并得到一个 GPG 密码请求,如下所示:
$ git ci
You need a passphrase to unlock the secret key for
user: "Randall Degges <r@rdegges.com>"
4096-bit RSA key, ID 8F700DA2, created 2016-04-05
[master 1740961] blah
1 file changed, 1 insertion(+)
Run Code Online (Sandbox Code Playgroud)问题是:每次我提交时,都会再次提示我输入 GPG 密码。
我想要做的是配置 GPG 代理以将我的密码缓存一整天,因此只需输入一次。
我已经阅读了大量的文档和博客文章,这是我迄今为止尝试过的......
首先,我修改了我的~/.zshrc文件(我使用 zsh)来设置以下内容:
# GPG Agent
export GPG_TTY=$(tty)
export GPGKEY=8F700DA2
Run Code Online (Sandbox Code Playgroud)
现在,从我读到的内容来看,在重新启动 …
我已经在 Ubuntu 12.04 LTS 上安装了 Tomcat 7,它在 Amzon EC2 实例上运行。现在我希望 tomcat 应该在系统重启时自动重启。
我阅读了这篇博客,其中建议将以下脚本添加到/etc/init.d/tomcat7:
# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid
case $1 in
start)
sh /usr/share/tomcat7/bin/startup.sh
;;
stop)
sh /usr/share/tomcat7/bin/shutdown.sh
;;
restart)
sh /usr/share/tomcat7/bin/shutdown.sh
sh /usr/share/tomcat7/bin/startup.sh
;;
esac
exit 0
Run Code Online (Sandbox Code Playgroud)
并发出以下命令:
sudo chmod 755 /etc/init.d/tomcat7
sudo ln -s /etc/init.d/tomcat7 /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat7 /etc/rc2.d/S99tomcat
sudo /etc/init.d/tomcat7 restart
Run Code Online (Sandbox Code Playgroud)
我的问题
我能否举例说明这三个元素(这些元素是否称为元字符?)有何不同?
我知道这*意味着全有或全无,但我不确定这是否是正确的思考方式。另一方面.,?似乎是一样的。他们匹配一个字符,对吧?
我已经使用 Oracle VM VirtualBox Manager 在虚拟环境中安装了 Ubuntu,它运行良好。
但是我想启用多个内核 - 如下图所示,我的 Windows 机器有 2 个内核:

现在,当我lscpu在 Ubuntu 中运行时,我得到以下信息,表明仅使用了 1 个核心:

我已经尝试更改虚拟框的设置以启用多个处理器,但它不允许我这样做,如下图所示:

如何在我的虚拟环境中启用多核(处理器)?
在我的笔记本电脑上安装 vlc 时,我在终端中输入了命令vlc。它返回了一条消息说:
当前未安装程序 vlc。您可以通过键入 sudo apt-get install vlc-nox 来安装它
但相反,我只是输入sudo apt-get install vlc. 什么是vlc-nox?它不同于vlc?
使用官方 Ubuntu 16.04 LTS (Xenial Xerus) Vagrant box 映像(在 VirtualBox 上)我在基本网络设置方面遇到问题:
我的Vagrantfile:
Vagrant.configure(2) do |config|
config.vm.box = 'ubuntu/xenial64'
config.vm.define "xenial" do |server|
server.vm.network "private_network", ip: "192.168.10.10"
end
end
Run Code Online (Sandbox Code Playgroud)
vagrant up 结果:
==> xenial: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/sbin/ifdown eth1 2> /dev/null
Stdout from the command:
Stderr from the command:
sudo: unable to resolve host ubuntu-xenial
mesg: ttyname failed: …Run Code Online (Sandbox Code Playgroud)