SlideShare a Scribd company logo
Webinar
Gus Luxton
Solutions Engineer
Industry Best Practices
for SSH Access
Why securing SSH is important
● Managing access to servers has traditionally
involved sharing passwords via a password
manager or copying SSH keys around to servers
using automation.
● This doesn’t scale well with growing
organisations and can make
onboarding/offboarding users hard.
● Credential leaks and compromises are very real
and present a huge security risk.
● Once access is provided, there’s very
little visibility into what anyone is doing.
Summary
● Step 1: Switch from using public keys to certificates
● Step 2: Use a highly available bastion host as an access gateway
● Step 3: Enforce the use of a second factor
● Step 4: Get user identities from a identity provider
Step 1: Switch from public keys to certificates
Some pros of public keys
● Far more secure than shared passwords due to greater entropy
● Can’t be keylogged - nobody ever types a private key
● Cryptographically secure - reliable way to authenticate that the
person accessing your server actually has that private key in their
possession
Some cons of public keys
● Can be hard to keep track of which key goes where
● No expiration by default
● Requires a process for distribution to be useful
We’re all too busy for this...
● Lack of built-in accountability regarding what key belongs to who
● Makes credential rotation hard without building a separate process
Step 1: Switch from public keys to certificates
Some benefits of certificates
● All the benefits of public keys as described
beforehand, with none of the explicit downsides
● Support for additional metadata - add an email
address, internal username or ticket reference to
every certificate issued, and define a list of users that
the certificate is permitted to authenticate as
● Simple to issue and reissue without external
changes meaning credential expiry and rotation can
be built in automatically
● Can be revoked by synchronizing a CRL to servers
Certificate metadata: example
● Customizable ID that you can set per-certificate
● Short validity period to limit access by default
● Contains a list of authorized principals (logins) that the certificate will permit
● Extensions to limit permissions further if desired
But wait - there’s more!
It’s called “Trust on first use” or “TOFU” and represents a
fundamentally insecure model.
Messages like these can be a thing of the past if you switch to
using certificates to authenticate your hosts.
Anyone seen a prompt like this before?
Step 2: Use a bastion server for access
● In an era of more remote work we’re all connecting from different
locations regularly
● Whitelisting on a server-by-server basis is tricky - borderline impossible
● Bastions can be highly available and provide you with a reduced attack
surface by limiting locations you can connect from - no need for a VPN
● It doesn’t have to be hard - SSH supports the use of jump hosts out of
the box with the -J flag
● Blocking or revoking access becomes much simpler when you know that
all your connections are coming from a limited number of locations
● Provides a central location for logging and auditing access to your fleet
Step 3: Enforce the use of a second factor
● Two-factor authentication (2FA/2-Fac) refers to the idea of requiring
multiple factors before allowing access
○ “Something you know” like a password
○ “Something you have” like an authenticator app, or an SMS*
○ “Something you are” like a fingerprint/retina scan or voice print
● Lots of flexibility in ways to provide this
○ TOTP application - scan QR code, get a new code every 30 seconds
○ Push services like Duo, Okta, Auth0
○ Linux PAM (pluggable authentication modules) available for these
* SMS is not very secure. I don’t recommend you ever use it for a second factor.
● Can you make a list of every user you have?
○ Could you do this for 100 users? 1,000 users? 10,000
users?
● If an SSH user leaves, you want to revoke their access
○ How do you know you’ve got all their keys?
● Use an identity provider as the source of truth for users
○ Active Directory, Okta, OneLogin, Auth0, Github
○ One place to add users, one place to remove users
Step 4: Get identity from a third party
Summary
● Step 1: Switch from using public keys to certificates
● Step 2: Use a highly available bastion host as an access gateway
● Step 3: Enforce the use of a second factor
● Step 4: Get user identities from a identity provider
How can you do this easily?
● Open source, written in Go
● Written by engineers for engineers
● Doesn’t get in the way
● Fully compatible with SSH and your existing tooling
https://github.com/gravitational/teleport
Recommended Next Steps
Read “How to SSH Properly”
https://gravitational.com/blog/how-to-ssh-properly/
Check us out on Github
https://github.com/gravitational/teleport
Download Teleport
https://gravitational.com/teleport/download
Thanks!

More Related Content

What's hot

Introduction to SSL/TLS
Introduction to SSL/TLSIntroduction to SSL/TLS
Introduction to SSL/TLS
keithrozario
 
SSL Secure socket layer
SSL Secure socket layerSSL Secure socket layer
SSL Secure socket layer
Ahmed Elnaggar
 
TLS - Transport Layer Security
TLS - Transport Layer SecurityTLS - Transport Layer Security
TLS - Transport Layer Security
ByronKimani
 
How ssl works
How ssl worksHow ssl works
How ssl works
Saptarshi Basu
 
Transport layer security (tls)
Transport layer security (tls)Transport layer security (tls)
Transport layer security (tls)
Kalpesh Kalekar
 
Cryptography - Overview
Cryptography - OverviewCryptography - Overview
Cryptography - Overview
Mohammed Adam
 
Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)
Asad Ali
 
ssl
sslssl
ssl
sjyuva
 
Ssl (Secure Socket Layer)
Ssl (Secure Socket Layer)Ssl (Secure Socket Layer)
Ssl (Secure Socket Layer)
Sandeep Gupta
 
SSl/TLS Analysis
SSl/TLS AnalysisSSl/TLS Analysis
SSl/TLS Analysis
Duduman Bogdan Vlad
 
SSL
SSLSSL
Basics of ssl
Basics of sslBasics of ssl
secure socket layer
secure socket layersecure socket layer
secure socket layer
Amar Shah
 
SSL
SSLSSL
SSL TLS Protocol
SSL TLS ProtocolSSL TLS Protocol
SSL TLS Protocol
Devang Badrakiya
 
Introduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & SecureIntroduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & Secure
Brian Ritchie
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
Abhishek Gupta
 
TLS v1.3
TLS v1.3TLS v1.3
TLS v1.3
Siddhartha Rao
 
OpenSSL
OpenSSLOpenSSL
OpenSSL
Timbal Mayank
 
SSL/TLS
SSL/TLSSSL/TLS
SSL/TLS
pavansmiles
 

What's hot (20)

Introduction to SSL/TLS
Introduction to SSL/TLSIntroduction to SSL/TLS
Introduction to SSL/TLS
 
SSL Secure socket layer
SSL Secure socket layerSSL Secure socket layer
SSL Secure socket layer
 
TLS - Transport Layer Security
TLS - Transport Layer SecurityTLS - Transport Layer Security
TLS - Transport Layer Security
 
How ssl works
How ssl worksHow ssl works
How ssl works
 
Transport layer security (tls)
Transport layer security (tls)Transport layer security (tls)
Transport layer security (tls)
 
Cryptography - Overview
Cryptography - OverviewCryptography - Overview
Cryptography - Overview
 
Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)
 
ssl
sslssl
ssl
 
Ssl (Secure Socket Layer)
Ssl (Secure Socket Layer)Ssl (Secure Socket Layer)
Ssl (Secure Socket Layer)
 
SSl/TLS Analysis
SSl/TLS AnalysisSSl/TLS Analysis
SSl/TLS Analysis
 
SSL
SSLSSL
SSL
 
Basics of ssl
Basics of sslBasics of ssl
Basics of ssl
 
secure socket layer
secure socket layersecure socket layer
secure socket layer
 
SSL
SSLSSL
SSL
 
SSL TLS Protocol
SSL TLS ProtocolSSL TLS Protocol
SSL TLS Protocol
 
Introduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & SecureIntroduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & Secure
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
 
TLS v1.3
TLS v1.3TLS v1.3
TLS v1.3
 
OpenSSL
OpenSSLOpenSSL
OpenSSL
 
SSL/TLS
SSL/TLSSSL/TLS
SSL/TLS
 

Similar to Industry Best Practices For SSH - DevOps.com Webinar

SSL certificates
SSL certificatesSSL certificates
SSL certificates
Kevin OBrien
 
Managing secrets at scale
Managing secrets at scaleManaging secrets at scale
Managing secrets at scale
Alex Schoof
 
Cloud Identity Management
Cloud Identity ManagementCloud Identity Management
Cloud Identity Management
Damian T. Gordon
 
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Netgate
 
Authentication Concepts
Authentication ConceptsAuthentication Concepts
Authentication Concepts
Charles Southerland
 
Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!
All Things Open
 
PKI & SSL
PKI & SSLPKI & SSL
PKI & SSL
RitaThakkar1
 
#Morecrypto (with tis) - version 2.2
#Morecrypto (with tis) - version 2.2#Morecrypto (with tis) - version 2.2
#Morecrypto (with tis) - version 2.2
Olle E Johansson
 
Authentication Methods authauthauthauthauthautha
Authentication Methods authauthauthauthauthauthaAuthentication Methods authauthauthauthauthautha
Authentication Methods authauthauthauthauthautha
Olajide Kuku
 
Secure shell ppt
Secure shell pptSecure shell ppt
Secure shell ppt
sravya raju
 
encryption presentation (SAGE-WA, 2010-10-05)
encryption presentation (SAGE-WA, 2010-10-05)encryption presentation (SAGE-WA, 2010-10-05)
encryption presentation (SAGE-WA, 2010-10-05)
Alastair Irvine
 
Public key infrastrucure and its uses.pptx
Public key infrastrucure and its uses.pptxPublic key infrastrucure and its uses.pptx
Public key infrastrucure and its uses.pptx
GayathriSanthosh11
 
Digital signature
Digital  signatureDigital  signature
Digital signature
AJAL A J
 
Mutual Authentication For Wireless Communication
Mutual Authentication For Wireless CommunicationMutual Authentication For Wireless Communication
Mutual Authentication For Wireless Communication
manish kumar
 
The Myth of SSH Key Rotation Mythcracker Webcast Series Part 3
The Myth of SSH Key Rotation Mythcracker Webcast Series Part 3 The Myth of SSH Key Rotation Mythcracker Webcast Series Part 3
The Myth of SSH Key Rotation Mythcracker Webcast Series Part 3
SSH Communications Security
 
CISSP Prep: Ch 6. Identity and Access Management
CISSP Prep: Ch 6. Identity and Access ManagementCISSP Prep: Ch 6. Identity and Access Management
CISSP Prep: Ch 6. Identity and Access Management
Sam Bowne
 
Keycloak SSO basics
Keycloak SSO basicsKeycloak SSO basics
Single Sign-On & Strong Authentication
Single Sign-On & Strong AuthenticationSingle Sign-On & Strong Authentication
Single Sign-On & Strong Authentication
Arun S M
 
OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect Protocol
Michael Furman
 
5. Identity and Access Management
5. Identity and Access Management5. Identity and Access Management
5. Identity and Access Management
Sam Bowne
 

Similar to Industry Best Practices For SSH - DevOps.com Webinar (20)

SSL certificates
SSL certificatesSSL certificates
SSL certificates
 
Managing secrets at scale
Managing secrets at scaleManaging secrets at scale
Managing secrets at scale
 
Cloud Identity Management
Cloud Identity ManagementCloud Identity Management
Cloud Identity Management
 
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
Certificate Management on pfSense 2.4 - pfSense Hangout September 2017
 
Authentication Concepts
Authentication ConceptsAuthentication Concepts
Authentication Concepts
 
Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!
 
PKI & SSL
PKI & SSLPKI & SSL
PKI & SSL
 
#Morecrypto (with tis) - version 2.2
#Morecrypto (with tis) - version 2.2#Morecrypto (with tis) - version 2.2
#Morecrypto (with tis) - version 2.2
 
Authentication Methods authauthauthauthauthautha
Authentication Methods authauthauthauthauthauthaAuthentication Methods authauthauthauthauthautha
Authentication Methods authauthauthauthauthautha
 
Secure shell ppt
Secure shell pptSecure shell ppt
Secure shell ppt
 
encryption presentation (SAGE-WA, 2010-10-05)
encryption presentation (SAGE-WA, 2010-10-05)encryption presentation (SAGE-WA, 2010-10-05)
encryption presentation (SAGE-WA, 2010-10-05)
 
Public key infrastrucure and its uses.pptx
Public key infrastrucure and its uses.pptxPublic key infrastrucure and its uses.pptx
Public key infrastrucure and its uses.pptx
 
Digital signature
Digital  signatureDigital  signature
Digital signature
 
Mutual Authentication For Wireless Communication
Mutual Authentication For Wireless CommunicationMutual Authentication For Wireless Communication
Mutual Authentication For Wireless Communication
 
The Myth of SSH Key Rotation Mythcracker Webcast Series Part 3
The Myth of SSH Key Rotation Mythcracker Webcast Series Part 3 The Myth of SSH Key Rotation Mythcracker Webcast Series Part 3
The Myth of SSH Key Rotation Mythcracker Webcast Series Part 3
 
CISSP Prep: Ch 6. Identity and Access Management
CISSP Prep: Ch 6. Identity and Access ManagementCISSP Prep: Ch 6. Identity and Access Management
CISSP Prep: Ch 6. Identity and Access Management
 
Keycloak SSO basics
Keycloak SSO basicsKeycloak SSO basics
Keycloak SSO basics
 
Single Sign-On & Strong Authentication
Single Sign-On & Strong AuthenticationSingle Sign-On & Strong Authentication
Single Sign-On & Strong Authentication
 
OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect Protocol
 
5. Identity and Access Management
5. Identity and Access Management5. Identity and Access Management
5. Identity and Access Management
 

Recently uploaded

Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 

Recently uploaded (20)

Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 

Industry Best Practices For SSH - DevOps.com Webinar

  • 1. Webinar Gus Luxton Solutions Engineer Industry Best Practices for SSH Access
  • 2. Why securing SSH is important ● Managing access to servers has traditionally involved sharing passwords via a password manager or copying SSH keys around to servers using automation. ● This doesn’t scale well with growing organisations and can make onboarding/offboarding users hard. ● Credential leaks and compromises are very real and present a huge security risk. ● Once access is provided, there’s very little visibility into what anyone is doing.
  • 3. Summary ● Step 1: Switch from using public keys to certificates ● Step 2: Use a highly available bastion host as an access gateway ● Step 3: Enforce the use of a second factor ● Step 4: Get user identities from a identity provider
  • 4. Step 1: Switch from public keys to certificates Some pros of public keys ● Far more secure than shared passwords due to greater entropy ● Can’t be keylogged - nobody ever types a private key ● Cryptographically secure - reliable way to authenticate that the person accessing your server actually has that private key in their possession
  • 5. Some cons of public keys ● Can be hard to keep track of which key goes where ● No expiration by default ● Requires a process for distribution to be useful We’re all too busy for this... ● Lack of built-in accountability regarding what key belongs to who ● Makes credential rotation hard without building a separate process Step 1: Switch from public keys to certificates
  • 6. Some benefits of certificates ● All the benefits of public keys as described beforehand, with none of the explicit downsides ● Support for additional metadata - add an email address, internal username or ticket reference to every certificate issued, and define a list of users that the certificate is permitted to authenticate as ● Simple to issue and reissue without external changes meaning credential expiry and rotation can be built in automatically ● Can be revoked by synchronizing a CRL to servers
  • 7. Certificate metadata: example ● Customizable ID that you can set per-certificate ● Short validity period to limit access by default ● Contains a list of authorized principals (logins) that the certificate will permit ● Extensions to limit permissions further if desired
  • 8. But wait - there’s more! It’s called “Trust on first use” or “TOFU” and represents a fundamentally insecure model. Messages like these can be a thing of the past if you switch to using certificates to authenticate your hosts. Anyone seen a prompt like this before?
  • 9. Step 2: Use a bastion server for access ● In an era of more remote work we’re all connecting from different locations regularly ● Whitelisting on a server-by-server basis is tricky - borderline impossible ● Bastions can be highly available and provide you with a reduced attack surface by limiting locations you can connect from - no need for a VPN ● It doesn’t have to be hard - SSH supports the use of jump hosts out of the box with the -J flag ● Blocking or revoking access becomes much simpler when you know that all your connections are coming from a limited number of locations ● Provides a central location for logging and auditing access to your fleet
  • 10. Step 3: Enforce the use of a second factor ● Two-factor authentication (2FA/2-Fac) refers to the idea of requiring multiple factors before allowing access ○ “Something you know” like a password ○ “Something you have” like an authenticator app, or an SMS* ○ “Something you are” like a fingerprint/retina scan or voice print ● Lots of flexibility in ways to provide this ○ TOTP application - scan QR code, get a new code every 30 seconds ○ Push services like Duo, Okta, Auth0 ○ Linux PAM (pluggable authentication modules) available for these * SMS is not very secure. I don’t recommend you ever use it for a second factor.
  • 11. ● Can you make a list of every user you have? ○ Could you do this for 100 users? 1,000 users? 10,000 users? ● If an SSH user leaves, you want to revoke their access ○ How do you know you’ve got all their keys? ● Use an identity provider as the source of truth for users ○ Active Directory, Okta, OneLogin, Auth0, Github ○ One place to add users, one place to remove users Step 4: Get identity from a third party
  • 12. Summary ● Step 1: Switch from using public keys to certificates ● Step 2: Use a highly available bastion host as an access gateway ● Step 3: Enforce the use of a second factor ● Step 4: Get user identities from a identity provider
  • 13. How can you do this easily? ● Open source, written in Go ● Written by engineers for engineers ● Doesn’t get in the way ● Fully compatible with SSH and your existing tooling https://github.com/gravitational/teleport
  • 14. Recommended Next Steps Read “How to SSH Properly” https://gravitational.com/blog/how-to-ssh-properly/ Check us out on Github https://github.com/gravitational/teleport Download Teleport https://gravitational.com/teleport/download