SSH

共 23 篇文章。

Keeping your ssh connection alive

• Security

Sometimes, when you are in a NAT’ed environment, ssh connection may be dropped when the gateway is busy.

OpenSSH has provided a solution against this.

The option is called “ClientAliveInterval”. With this setting in your sshd_config, sshd(8) would send a ping message through the encrypted channel periodically, thus prevent the early drop.

The default setting is 15, meaning the ping period is 15 seconds.

阅读全文… ( 本文约 79 字,阅读大致需要 1 分钟 )

窝窝头翻身——现一大眼

• Development

So I finally got a big pointyhat…

This is the point:

if (!_ioctl(fd, FIODGNAME, &fgn))

So this means SUCCEEDED and the return value should be used. However, my recent commit has reverted the logic so that will fail. Seems sshd(1) don’t like this…

Fixed now.

参与评论

Using ssh-agent(1) to ease usage of SSH key authentication

• Security

Many SSH clients supports “key agent” or “authentication agent”, which holds private key for you, and ease the authentication process.

By default, OpenSSH does not enable this. You can easily use ssh-agent(1) to accomplish the mission.

ssh-agent startx

The above command will start X session with ssh-agent. This means that you can add private key to the agent.

ssh-add ~/.ssh/id_dsa

Add your own ssh key.

Then ssh authentications will be accomplished automatically. Note that you may need to use ssh -A in certain configurations.

参与评论