zimmem
  • Introduction
  • 大数据运维
    • cdh
      • Create Cloudera Manager extensions
      • Create Custom Cloudera Add-on Service
      • Create Custom Repository
      • extjs-dependency-by-oozie.md
      • install-cdh-on-ubuntu-16.md
      • Install Cloudera Manager on CentOS 6
      • Install Cloudera Manager on Ubuntu 16
      • Read/Write hive table when running spark2 by oozie
    • hadoop
      • hdfs.md
      • Resource Configuration
    • hbase
      • README.md
    • hive
      • README.md
    • impala
      • Impala Maintenance Instructions
    • spark
      • cvc.md
      • Spark DataFrame Join
      • Spark Shell
      • Spark Submit
    • Apache Ambari Installation
    • big-data-platform-ops.md
    • hdp.md
  • 区块链
    • hyperledger-fabric
      • img
      • Block Struct
      • 概念
      • 在 kubernetes 上搭建 hyperledger-fabric
  • 数据处理
    • datasets
      • 人脸数据集
    • 降维
      • LDA.md
      • PCA 主成份分析
    • face
      • 人脸关键点检测方法
    • machine-learning
      • gan
        • GAN 学习资料
      • nlp
        • word2vec
      • 机器学习资源
    • 数学知识
      • 统计学
        • 基础知识
        • 交叉熵
        • # 方差与标准差
      • Mathjax Demo
      • 矩阵知识 {matrix}
    • recomand-system
      • 推荐系统相关文章与开源方案
    • tensorflow
      • images
      • dataset
      • 分布式训练
      • Optimizer Compare
      • saved_model
    • 十大数据挖掘数法
      • math
        • 最小二乘法
      • AdaBoost.md
      • Apriori.md
      • 数据挖掘十大经典算法之 C4.5
      • CART.md
      • EM.md
      • k-means.md
      • kNN.md
      • Naive-Baye.md
      • PageRank.md
      • Svm.md
      • top-10-data-mining-algorithm.md
    • 机器学习模型评估
    • Tensorflow Model Serving
  • 数据仓库
    • user-portrait.md
    • Articles
  • 运维开发
    • docker
      • 安装后免 sudo
    • gong-ju
      • install-latest-git-version-on-centos.md
    • linux
      • images
      • iptables
      • network
      • performance-diagnosis.md
      • Shell Syntax
      • SSH with Kerbors5 on Ubuntu
      • wget
    • network
      • install-merlin-on-asus-router.md
    • docker.md
    • Performance diagnosis
    • RabbitMQ
  • 开发语言与框架
    • dubbo
      • README.md
    • java
      • mybatis
      • spring
        • spring-mvc
          • 扩展点
        • 常用扩展
        • Srping MVC
      • How to use G1 garbage collector
      • How to Print GC log
      • spring.md
    • nodejs
      • npm 配置 registry 镜像或代理
    • spring
      • Hive Maintenance Instructions
      • 配置项
      • xxx.md
  • 存储系统
    • mongodb
      • README.md
    • mysql
      • operation
        • 数据导入导出
      • Install Mysql Server by Yum
      • mysql-diff.md
      • Mysql Settings
      • User Management
  • tools
    • Intellij IDEA
  • _book
    • .vscode
    • 大数据运维
      • cdh
      • hadoop
      • hbase
      • hive
      • impala
      • spark
    • 区块链
      • hyperledger-fabric
        • img
    • 数据处理
      • dimension-reduction
      • machine-learning
      • math
        • statistics
      • recomand-system
      • tensorflow
        • images
      • top-10-data-mining-algorithm
        • math
    • 数据仓库
    • 运维开发
      • docker
      • gong-ju
      • linux
        • images
      • network
    • gitbook
      • fonts
        • fontawesome
      • gitbook-plugin-alerts
      • gitbook-plugin-expandable-chapters-interactive
      • gitbook-plugin-fontsettings
      • gitbook-plugin-highlight
      • gitbook-plugin-livereload
      • gitbook-plugin-mathjax
      • gitbook-plugin-search-plus-mod
      • gitbook-plugin-sharing
      • images
    • 开发语言与框架
      • dubbo
      • java
        • spring
          • spring-mvc
      • nodejs
      • spring
    • 存储系统
      • mongodb
      • mysql
        • operation
    • styles
      • README.md
    • Configuration
    • Sandbox
Powered by GitBook
On this page
  • kerberos server and admin server install
  • ssh server
  • ssh client
  • xshell 通过 kerberos 登录
  • 参考文章
  1. 运维开发
  2. linux

SSH with Kerbors5 on Ubuntu

kerberos server and admin server install

sudo apt install krb5-kdc krb5-admin-server

key config in /etc/krb5.conf

[libdefaults]
    default_realm = EXAMPLE.COM
[realms]
    EXAMPLE.COM = {
        kdc = kdc.example.com
        admin_server = kbr-admin.example.com
    }
#init realm
# may be take long time to wait after the notice `Loading random data`
krb5_newrealm

添加用户

kadmin.local
addprinc username
# 给机器 s1 添加 Princple 及 keytab , 并将该 keytab 复制到 s1 机器 /etc 目录下, sshd 会用到 krb5.keytab, 确定主机名一致
kadmin.local -q "addprinc -randkey host/s1.dev.example.com"
kadmin.local -q " ktadd -k /etc/krb5.keytab host/s1.dev.example.com"

ssh server

保证跟 kdc 一样的 krb5.conf

[libdefaults]
    default_realm = EXAMPLE.COM
[realms]
    EXAMPLE.COM = {
        kdc = kdc.example.com
        admin_server = kbr-admin.example.com
    }

修改 /etc/ssh/sshd_config

KerberosAuthentication yes
KerberosTicketCleanup yes
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes

在 $HOME/.k5login 中列出允许登录的 princ

user1@EXAMPLE.COM

ssh client

install kerberos client

apt install krb5-user

# 初始化 ticket
kinit user

xshell 通过 kerberos 登录

安装 MIT Kerberos for Windows 4.1

使用上面的 krb5.conf 覆盖到 C:\ProgramData\MIT\Kerberos5\krb5.ini, 或通过 KRB5_CONFIG 环境变量指定 krb5.ini 位置

参考文章

PreviousShell SyntaxNextwget

Last updated 6 years ago

64-bit MSI Installer , 10812k.

32-bit MSI Installer , 5836k.

kfw-4.1-amd64.msi
kfw-4.1-i386.msi
https://help.ubuntu.com/lts/serverguide/kerberos.html.en#kerberos-server
http://www.visolve.com/ssh.php#Kerberos_Authentication
https://docs.oracle.com/cd/E19253-01/819-7061/6n91j2vds/index.html