我有一个远程服务器。我已经可以成功地通过 ssh 连接到该远程服务器 - 我的密钥在authorized_keys远程服务器上。
现在我想从 GitHub 直接拉到那个远程服务器上。但是permission denied (publickey)当我尝试ssh -T git@github.com远程服务器时,我得到了。
我应该id_rsa.pub直接从我的本地机器复制到远程服务器上,还是那样危险?
如果这是答案,那么最好的方法是什么?
或者我应该在远程服务器上生成一个新的公钥,并将其添加到我的 github acocount 中?
更新:
这是详细 ssh 的输出:
~$ ssh -Tv git@github.com
OpenSSH_6.0p1 Debian-4+deb7u2, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to github.com [192.30.252.131] port 22.
debug1: Connection established.
debug1: identity file /home/richard/.ssh/id_rsa type -1
debug1: identity file /home/richard/.ssh/id_rsa-cert type -1
debug1: identity file /home/richard/.ssh/id_dsa …Run Code Online (Sandbox Code Playgroud) 我有一个名为的文件All CRGs.zip,我想将其内容解压缩到一个名为的目录中data(该目录已存在并包含一些其他文件)。
这可能吗?我在 OSX 上工作。
我试过了:
$ unzip "All CRGs.zip" -d data/
Run Code Online (Sandbox Code Playgroud)
但这会解压缩所有data/All CRGs不是我想要的东西。我希望一切都直接进入data.
这可能吗?
我有一台新机器 (H1),我想从旧机器 (H2) 复制我的 ssh 密钥。我怎样才能做到这一点?
从谷歌搜索答案似乎是ssh-copy-id:问题是我没有从 H2 到 H1 的 ssh 访问权限。
我可以通过 USB 记忆棒将 H2 的全部内容复制~/.ssh到 H1 上吗?这会导致问题吗?
为什么会这样?
$ ssh-copy-id me@server
/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system.
$ ssh me@server
me@server's password:
Run Code Online (Sandbox Code Playgroud)
ssh 仍然提示输入密码,即使它说密钥已经存在于远程服务器(这是 Debian)上。
更新:.ssh文件夹的内容:
$ ls -al ~/.ssh
total 72
drwx------ 9 me staff 306 22 Apr 13:20 .
drwxr-xr-x+ 65 me staff 2210 22 Apr 13:18 ..
-rwxr-xr-x 1 me staff 1397 22 Apr 11:49 config …Run Code Online (Sandbox Code Playgroud) 这里是 Unix 新手。我正在尝试从gunicorn开始systemctl。没有出现错误消息,但它也没有显示在进程列表中:
$ sudo systemctl start gunicorn\n$ ps aux | grep gunicorn\ntest+ 29902 0.0 0.0 14224 924 pts/0 S+ 11:13 0:00 grep --color=auto gunicorn\nRun Code Online (Sandbox Code Playgroud)\n\n有没有可能它正在运行,但不可见?
\n\n或者如果没有,我该如何调试它没有运行的原因?
\n\n更新:刚刚尝试systemctl status gunicorn并得到了这个:
\xe2\x97\x8f gunicorn.service - Gunicorn Application Server handling myapp\n Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)\n Active: inactive (dead) (Result: exit-code) since Mon 2016-10-31 11:24:04 EDT; 1min 25s ago\n Process: 30135 ExecStart=/.venv/bin/gunicorn --workers 3 --bind unix:/home/myapp/myapp/myapp.sock myapp.wsgi:application (code=exited, status=200/CHDIR)\n Main …Run Code Online (Sandbox Code Playgroud)