我试图ssh在登录时自动更改到特定目录。我尝试使用以下指令使该行为正常工作~/.ssh/config:
Host example.net
LocalCommand "cd web"
Run Code Online (Sandbox Code Playgroud)
但是每当我登录时,我都会看到以下内容:
/bin/bash: cd web: No such file or directory
Run Code Online (Sandbox Code Playgroud)
尽管web我的主目录中肯定有一个文件夹。即使使用绝对路径也会给出相同的消息。需要明确的是,如果我cd web在登录后输入,我会进入正确的文件夹。
我在这里缺少什么?
编辑:
引号/绝对路径的不同组合给出不同的错误信息:
LocalCommand "cd web"
/bin/bash: cd web: No such file or directory
LocalCommand cd web
/bin/bash: line 0: cd: web: No such file or directory
LocalCommand cd /home/gareth/web
/bin/bash: line 0: cd: /home/gareth/web: Input/output error
Run Code Online (Sandbox Code Playgroud)
这让我认为引号不应该在那里,并且发生了另一个错误。
在 Ubuntu 14.04 上标准安装 phpmyadmin 后,我发现<site>/phpmyadmin它不起作用。谷歌搜索后,我发现这可以通过添加这一行来解决
Include "/etc/apache2/conf-enabled/*.conf"
Run Code Online (Sandbox Code Playgroud)
添加到/etc/apache2/apache2.conf配置文件。
但在 apache 重新加载后,我收到此错误消息
* Reloading web server apache2
*
* The apache2 configtest failed. Not doing anything.
Output of config test was:
AH00526: Syntax error on line 30 of /etc/apache2/conf-enabled/phpmyadmin.conf:
Unknown Authz provider: valid-user
Action 'configtest' failed.
The Apache error log may have more information.
Run Code Online (Sandbox Code Playgroud)
如何修复错误并使其phpmyadmin正常工作?