小编har*_*ari的帖子

什么是伪终端 (pty/tty)?

这可能是非常基本的问题,但我想彻底了解它。

  1. 什么是伪终端?(tty/pty)
  2. 我们为什么需要它们?他们是如何被介绍的以及对它的需求是什么?
  3. 它们过时了吗?我们不再需要它们了吗?有什么东西可以代替它们吗?
  4. 任何有用的用例?

我做了什么:

  1. 阅读手册页 - 获得了一些信息,但没有确切的图片。
  2. 试图从 Richard Stevens 的 Unix Network Programming 中阅读它们。得到了一些信息,但不是那why?部分。

linux terminal pty

121
推荐指数
3
解决办法
8万
查看次数

ssh 端口转发以从任何地方访问我的家用机器

我来自这个问题:https : //superuser.com/questions/359799/how-to-make-freebsd-box-accessible-from-internet

我想了解这整个过程port forwarding

我读了很多东西,但我没能理解端口转发本身的基本概念。

我拥有的:

坐在我家的 freebsd 服务器。
网件路由器

这就是我想要实现的目标:

能够通过互联网从 Windows 机器访问 freebsd 服务器,以便能够打开网络浏览器并访问互联网。

我还想从我拥有的 ubuntu 机器访问这个 freebsd 盒子。

如果有人可以帮助我,那就太好了。

这是我为端口转发所做的 netgear 路由器设置。

网件端口转发

freebsd ssh ssh-tunneling port-forwarding

29
推荐指数
1
解决办法
5万
查看次数

linux中的“sys/ioctl.h”头文件

我在 Linux 2.6.32-26-generic

当我查看“ioctl.h”听者文件的 linux 源代码时,我可以看到许多变体。(对于不同的平台,我猜)。IE

./fs/ocfs2/ioctl.h
./fs/btrfs/ioctl.h
./fs/ceph/ioctl.h
./include/config/i2o/config/old/ioctl.h
./include/asm-generic/ioctl.h
./include/linux/hdlc/ioctl.h
./include/linux/ioctl.h
./drivers/video/via/ioctl.h
./drivers/staging/vt6655/ioctl.h
./drivers/staging/vt6656/ioctl.h
./arch/ia64/include/asm/ioctl.h
./arch/h8300/include/asm/ioctl.h
./arch/microblaze/include/asm/ioctl.h
./arch/score/include/asm/ioctl.h
./arch/avr32/include/asm/ioctl.h
./arch/alpha/include/asm/ioctl.h
./arch/x86/include/asm/ioctl.h
./arch/m32r/include/asm/ioctl.h
./arch/mn10300/include/asm/ioctl.h
./arch/sparc/include/asm/ioctl.h
./arch/powerpc/include/asm/ioctl.h
./arch/m68k/include/asm/ioctl.h
./arch/sh/include/asm/ioctl.h
./arch/xtensa/include/asm/ioctl.h
./arch/mips/include/asm/ioctl.h
./arch/s390/include/asm/ioctl.h
./arch/arm/include/asm/ioctl.h
./arch/blackfin/include/asm/ioctl.h
./arch/frv/include/asm/ioctl.h
./arch/parisc/include/asm/ioctl.h
./arch/cris/include/asm/ioctl.h
Run Code Online (Sandbox Code Playgroud)

但我看到该文件被包含为 #include <sys/ioctl.h>

这个映射是如何工作的?

linux c header-file

9
推荐指数
1
解决办法
2万
查看次数

如何调试SSH端口转发

这是ssh 端口转发的扩展,可以从任何地方访问我的家用机器

我尝试了那里提到的事情,但我无法ssh使用我的机器。

用于端口转发的 Netgear 路由器设置:

Start Port: 22
End Port: 22
Server IP Address: IP address of by FreeBSD box
Run Code Online (Sandbox Code Playgroud)

/etc/ssh/sshd_conf 我的 FreeBSD 盒子:

PasswordAuthentication yes
AllowUsers root
X11Forwarding yes
AllowTcpForwarding yes
Run Code Online (Sandbox Code Playgroud)

我如何尝试连接:

我已经注册dyndns.com并获得了一个映射到我的外部 IP 地址的 URL。

在我家庭网络中的另一台机器上,我这样做: ssh -l root my_dyndns_ip 这只是超时。

另一方面,我可以my_dyndns_url成功ping通。

调试

我该如何解决这个问题,以便我可以ssh从任何地方到达my_dnydns_url

我试图查看我的 Netgear 路由器的日志,但是在 ssh 尝试失败时,路由器上没有生成登录。

我也调查过,/var/log/messages但找不到任何东西。

编辑:0 以详细模式运行 ssh(按照@jasonwryan 的建议):

我注意到一件奇怪的事情:当我对 dyndns.com 提供的 url 执行 ssh 时,它试图连接到其他 …

freebsd ssh port-forwarding sshd

8
推荐指数
2
解决办法
5263
查看次数

FreeBSD 上的巨大 .sujournal 文件

我的空间用完了,当我检查时,我发现我有

# pwd
/usr
# ls -l .sujournal
-r--------  1 root  wheel  33554432 Dec 31  1969 .sujournal
Run Code Online (Sandbox Code Playgroud)

我想问一下应该/我可以删除它吗?这有什么影响吗?

freebsd journaling

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

FreeBSD 安装包位置

Unrealircd通过该sysinstall实用程序安装在 FreeBSD 上。

我似乎无法找到它的安装位置。

如何找到已安装软件包的默认位置?

编辑:我找到了带有该find实用程序的软件包。但一般来说,我怎么知道sysinstall安装后将包放在哪里?

freebsd package-management

3
推荐指数
2
解决办法
1912
查看次数