apache_conf SSH

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf SSH相关的知识,希望对你有一定的参考价值。

# SSH

## Generate a Key

Generate with `ssh-keygen -t rsa -C "your_email@example.com"`. Add email/info to act as a label.

Add **public** key (`id_rsa.pub`) to `~/.ssh/authorized_keys`.

## ~~Add to `ssh-agent`~~

- ~~`eval "$(ssh-agent -s)"`~~
- ~~`ssh-add ~/.ssh/id_rsa`~~

## Permissions

- `~` Not writeable by others (probably `0700`)
- `~/.ssh` `0700`
- `~/.ssh/authorized_keys` `0644`
- `~/.ssh/key` `0600`  
- `~/.ssh/key.pub` `0644`
Host *
  Port 22
  IdentityFile ~/.ssh/id_rsa
  ServerAliveInterval 120
  TCPKeepAlive no
  # Keep this here, it's (potentially) important
  # https://serverfault.com/a/869394
  # XAuthLocation /opt/X11/bin/xauth

# Host with X11 forwarding
Host foo
  HostName foo.bar
  User foobar
  ForwardX11 yes
  # Might also be needed
  # ForwardX11Trusted yes

# Host with no X11 forwarding
Host foo-nox
  HostName foo.bar
  User foobar

以上是关于apache_conf SSH的主要内容,如果未能解决你的问题,请参考以下文章

apache_conf SSH配置

apache_conf SSH

apache_conf 示例SSH配置文件。

apache_conf 用于ssh连接的配置文件

apache_conf 〜/ .ssh / config设置主机名别名

apache_conf 登录macOS时自动加载ssh密钥