小编noo*_*ler的帖子

如何为 c:\grep

我正在使用 cygwin 的 grep 来查找 c 驱动器上硬编码路径的所有实例。正在做:

grep -r "c:\\" .
Run Code Online (Sandbox Code Playgroud)

grep: trailing backslash

有谁知道我怎么能做到这一点?

shell grep cygwin quoting

4
推荐指数
1
解决办法
2531
查看次数

ssh root@localhost 错误;破解这个盒子

我需要在 linux vm 上获得一个 root shell 以用于安全类。我在系统上有一个用户帐户,并且可以写入任何文件(即 /etc...),并希望通过以下方式提升我的权限:

ssh root@localhost
Run Code Online (Sandbox Code Playgroud)

我使用 ssh-keygen 制作 rsa 密钥并将它们添加到 /root/.ssh/authorized_keys,并修改 /etc/ssh/sshd_config 以允许 root 连接。但是,我无法以 root 身份连接到该框。这是输出:

Last login: Fri Jan 27 00:43:01 2012 from localhost
Connection to localhost closed.
Run Code Online (Sandbox Code Playgroud)

在我看来,身份验证成功,但是连接立即关闭。我不知道为什么这不起作用。

详细输出是:

OpenSSH_4.6p1 Debian-7, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: identity file /home/user/.ssh/id_dsa …
Run Code Online (Sandbox Code Playgroud)

linux root ssh

1
推荐指数
1
解决办法
3871
查看次数

标签 统计

cygwin ×1

grep ×1

linux ×1

quoting ×1

root ×1

shell ×1

ssh ×1