SlideShare a Scribd company logo
Secure Shell (ssh) and SSHFP DNS
Records
(and Secure Copy - scp)
“old” ssh

For security, manually
compare this
fingerprint to
shinkuro.com’s known
ECDSA fingerprint...

$ ssh bob.novas@shinkuro.com
The authenticity of host 'shinkuro.com (66.92.164.104)' can't be established.
ECDSA key fingerprint is c5:3c:97:64:e4:99:ba:21:1c:bf:46:35:8c:d3:48:a1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'shinkuro.com,66.92.164.104' (ECDSA) to the list of known hosts.
Password:
Last login: Mon Jul 30 14:14:20 2012 from pool-108-28-91-61.washdc.fios.verizon.net
bob.novas@linux:~>

Next time you login, the fingerprint from shinkuro.com is
compared to the fingerprint saved in .ssh/known_hosts
(no user question unless the fingerprint doesn’t match).

The $64,000 question:
How do you get the “known ECDSA fingerprint” from shinkuro.com?
3/3/2014

2
ecdsa fingerprint
• shinkuro.com:/etc/ssh/ssh_host_ecdsa_key.pub:
ecdsa-sha2-nistp256
AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHA
yNTYAAABBBKnI9kF9QPkqqsLh7Ak7JhOtBoHjCDa928
OAApjnMerQkvrTulachl3Es30sqUGilyHkhmXVdRVQ4h
Ls8qxBqNk= root@linux
You essentially want to decode
this base64 string and get the
md5, sha1 and sha256 hash of
that big number

3/3/2014

3
python program that gets the md5,
sha1 and sha256 fingerprints
from hashlib import md5, sha1, sha256
from base64 import b16encode, b64decode
def main():
f = open("ssh_host_ecdsa_key.pub")
line = f.read()
parts = line.split()
decodedKey = b64decode(parts[1])
h_md5 = md5(decodedKey).digest()
h_sha1 = sha1(decodedKey).digest()
h_sha256 = sha256(decodedKey).digest()

b16_md5 = b16encode(h_md5).lower()
b16_sha1 = b16encode(h_sha1).lower()
b16_sha256 = b16encode(h_sha256).lower()
print "md5 hash=%s" % (b16_md5, )
print "%s IN SSHFP 3 1 ( %s )" % (parts[2].split('@')[1], b16_sha1, )
print "%s IN SSHFP 3 2 ( %s )" % (parts[2].split('@')[1], b16_sha256, )
if __name__ == "__main__":
main()
3/3/2014

4
run the python program:
And, here’s the number that
matches shinkuro.com’s ECDSA
key fingerprint and proves
you’re talking to the right host.

> main.py
md5 hash=c53c9764e499ba211cbf46358cd348a1
linux IN SSHFP 3 1 ( 3406cfb84d4be7ec8e593382c92db207bc982ee2 )
linux IN SSHFP 3 2 ( cc71ddcdb0d212d6fb88fc3df349cdc64f9d36fbb12336fd0173e01429fc14ac )

But wait... you really had to get this number
“out of band” from some authoritative source
who vouches that they actually ran the python
program on the “right” host.

3/3/2014

5
The “new” ssh with SSHFP
• now you need...
– the host you want to login to must have signed
SSHFP records with the host’s ecdsa sha1 and
sha256 fingerprint (if it’s been recently updated to
have ecdsa keys - if not, old ssh clients will work
with rsa/dsa keys)
– a DNSSEC aware resolver
– a copy of a ssh client built with the –with-ldns
option using a recent snapshot with the ecdsa
code
3/3/2014

6
host: signed DNS SSHFP records
>dig +dnssec @127.0.0.1 shinkuro.com SSHFP
; <<>> DiG 9.8.1 <<>> +dnssec @127.0.0.1 shinkuro.com SSHFP
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6803
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 5, AUTHORITY: 4, ADDITIONAL: 4
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; QUESTION SECTION:
;shinkuro.com.
IN SSHFP
;; ANSWER SECTION:
shinkuro.com.
14390 IN SSHFP 2 1 B6B102F02D6C791AAC26C7CCCD9F6C7290DC7B3F
shinkuro.com.
14390 IN SSHFP 3 1 3406CFB84D4BE7EC8E593382C92DB207BC982EE2
shinkuro.com.
14390 IN SSHFP 3 2 CC71DDCDB0D212D6FB88FC3DF349CDC64F9D36FBB12336FD0173E014 29FC14AC
shinkuro.com.
14390 IN SSHFP 1 1 295D4D75EF9BCC25BA55C98378313643853E06E0
shinkuro.com.
14390 IN RRSIG SSHFP 5 2 14400 20120911172329 20120802172329 51936 shinkuro.com. jSMtsJ
8Ff2bzHv524H8JlxFagdM+jiELbpLGjC4/YeBGd+J3gYF44Kiv ZvB93Fqlh0StQ6Z1MivXJAA2bweB4vkdC4Obktsk017XZKjebxBqkeZE 5tT50lSd/iCH
05qgcJ2hshzNeu0JRcDzHm2m4MVaKEKNZqlQVgrKixMJ pLk=

3/3/2014

7
rebuild ssh client
• Build a tip version of openssh (not the latest
release!) – openssh-SNAP-20120802
– openssl 1.0.1.c
– ldns 1.6.13
– recent openssh snapshot with option: --with-ldns

• Make sure /etc/resolv.conf points to a DNSSEC
aware resolver (e.g., not FIOS cable modem!)
• check ~/.ssh/known_hosts is empty
3/3/2014

8
login...
$ ssh -o VerifyHostKeyDNS=yes bob.novas@shinkuro.com
Password:
Last login: Sat Aug 4 15:50:03 2012 from pool-108-28-91-61.washdc.fios.verizon.net
Have a lot of fun...
bob.novas@linux:~>

or, set VerifyHostKeyDNS=yes in ~/.ssh/config:

$ ssh bob.novas@shinkuro.com
Password:
Last login: Sat Aug 4 16:10:30 2012 from pool-108-28-91-61.washdc.fios.verizon.net
Have a lot of fun...
bob.novas@linux:~>

3/3/2014

9
login with debug enabled
$ ssh -v -o VerifyHostKeyDNS=yes bob.novas@shinkuro.com
debug1: SSH2_MSG_NEWKEYS sent
OpenSSH_6.1p1-snap20120802, OpenSSL 1.0.0e 6 Sep 2011
debug1: expecting SSH2_MSG_NEWKEYS
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: SSH2_MSG_NEWKEYS received
debug1: Connecting to shinkuro.com [66.92.164.104] port 22.
debug1: Roaming not allowed by server
debug1: Connection established.
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: identity file /home/bob/.ssh/id_rsa type 1
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: identity file /home/bob/.ssh/id_rsa-cert type -1
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: identity file /home/bob/.ssh/id_dsa type 2
debug1: Next authentication method: publickey
debug1: identity file /home/bob/.ssh/id_dsa-cert type -1
debug1: Offering RSA public key: /home/bob/.ssh/id_rsa
debug1: identity file /home/bob/.ssh/id_ecdsa type -1
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: identity file /home/bob/.ssh/id_ecdsa-cert type -1
debug1: Offering DSA public key: /home/bob/.ssh/id_dsa
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: match: OpenSSH_5.8 pat OpenSSH_5*
debug1: Trying private key: /home/bob/.ssh/id_ecdsa
debug1: Enabling compatibility mode for protocol 2.0
debug1: Next authentication method: keyboard-interactive
debug1: Local version string SSH-2.0-OpenSSH_6.1
Password:
debug1: SSH2_MSG_KEXINIT sent
debug1: Authentication succeeded (keyboard-interactive).
debug1: SSH2_MSG_KEXINIT received
Authenticated to shinkuro.com ([66.92.164.104]:22).
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: channel 0: new [client-session]
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: Requesting no-more-sessions@openssh.com
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: Entering interactive session.
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Last login: Sat Aug 4 16:09:24 2012 from pool-108-28-91-61.washdc.fios.verizon.net
debug1: Server host key: ECDSA c5:3c:97:64:e4:99:ba:21:1c:bf:46:35:8c:d3:48:a1
Have a lot of fun...
debug1: found 4 secure fingerprints in DNS
bob.novas@linux:~>
debug1: matching host key fingerprint found in DNS
debug1: ssh_ecdsa_verify: signature correct

3/3/2014

ssh verifies fingerprint from
host against fingerprint in
signed DNS SSHFP record

10
DNSSEC SSHFP records
• work “automatically” to do something that is otherwise
difficult to do – how do you get that fingerprint?
• not quite ready for prime time:
– older ssh clients won’t work with hosts signed with ECDSA keys
even in fallback mode – must have recent snapshot
– ssh-keygen doesn’t yet generate ecdsa keys with sha1 or sha256
hash – python program to generate fingerprints
– ssh isn’t built (by vendors) with option –with-ldns – but you can
build your own
– ssh doesn’t use VerifyHostKeyDNS option by default (but, you
can set it in config file)

• all of this holds true for scp (secure copy) as well

3/3/2014

11

More Related Content

PPTX
Abusing Microsoft Kerberos - Sorry you guys don't get it
PDF
NSC #2 - D2 02 - Benjamin Delpy - Mimikatz
PDF
Ssh cookbook
PDF
SSH: Seguranca no Acesso Remoto
PDF
OpenSMTPD: we deliver !!
PDF
OpenSSH: keep your secrets safe
PDF
Zi nginx conf_2015
PDF
Advanced open ssh
Abusing Microsoft Kerberos - Sorry you guys don't get it
NSC #2 - D2 02 - Benjamin Delpy - Mimikatz
Ssh cookbook
SSH: Seguranca no Acesso Remoto
OpenSMTPD: we deliver !!
OpenSSH: keep your secrets safe
Zi nginx conf_2015
Advanced open ssh

What's hot (20)

PDF
What's up, RabbitMQ?
PDF
LibreSSL, one year later
PDF
Da APK al Golden Ticket
PDF
Reverse engineering Swisscom's Centro Grande Modem
PDF
Postgresql 12 streaming replication hol
PPTX
Kerberos, NTLM and LM-Hash
PDF
Unix executable buffer overflow
ODP
Getting started with RDO Havana
PDF
Cryptography (under)engineering
PDF
Pf: the OpenBSD packet filter
PPTX
Security Hole #11 - Unusual security vulnerabilities - Yuriy Bilyk
DOC
Source Code of Building Linux IPv6 DNS Server (Complete Sourcecode)
PDF
SSH I/O Streaming via Redis-based Persistent Message Queue -Mani Tadayon
PDF
Pledge in OpenBSD
PDF
5 Vampir Configuration At IU
PDF
BlockChain implementation by python
PDF
Relayd: a load balancer for OpenBSD
PDF
Killing any security product … using a Mimikatz undocumented feature
PDF
Kubernetes Tutorial
PDF
Run Run Trema Test
What's up, RabbitMQ?
LibreSSL, one year later
Da APK al Golden Ticket
Reverse engineering Swisscom's Centro Grande Modem
Postgresql 12 streaming replication hol
Kerberos, NTLM and LM-Hash
Unix executable buffer overflow
Getting started with RDO Havana
Cryptography (under)engineering
Pf: the OpenBSD packet filter
Security Hole #11 - Unusual security vulnerabilities - Yuriy Bilyk
Source Code of Building Linux IPv6 DNS Server (Complete Sourcecode)
SSH I/O Streaming via Redis-based Persistent Message Queue -Mani Tadayon
Pledge in OpenBSD
5 Vampir Configuration At IU
BlockChain implementation by python
Relayd: a load balancer for OpenBSD
Killing any security product … using a Mimikatz undocumented feature
Kubernetes Tutorial
Run Run Trema Test
Ad

Similar to Ssh and sshfp dns records v04 (20)

PDF
Importance of sshfp and configuring sshfp for network devices
PDF
Importance of SSHFP for Network Devices
PDF
An introduction to SSH
PPT
Presentation nix
PPT
Presentation nix
PDF
Open ssh cheet sheat
KEY
Intro to SSH
PPTX
Who Broke My Crypto
ODP
Hardening ssh configurations
PDF
SSH - Secure Shell
PPT
Introduction to SSH
PDF
Ssh cookbook v2
PDF
DSSH: Innovation in SSH
DOCX
Research and Analysis of SSH
PDF
FLOSS UK DEVOPS Spring 2015 Enhancing ssh config
PPTX
SSh_part_1.pptx
PDF
Dssh @ Confidence, Prague 2010
PDF
IBM Ported Tools for z/OS: OpenSSH User's Guide
PPT
Secure shell ppt
Importance of sshfp and configuring sshfp for network devices
Importance of SSHFP for Network Devices
An introduction to SSH
Presentation nix
Presentation nix
Open ssh cheet sheat
Intro to SSH
Who Broke My Crypto
Hardening ssh configurations
SSH - Secure Shell
Introduction to SSH
Ssh cookbook v2
DSSH: Innovation in SSH
Research and Analysis of SSH
FLOSS UK DEVOPS Spring 2015 Enhancing ssh config
SSh_part_1.pptx
Dssh @ Confidence, Prague 2010
IBM Ported Tools for z/OS: OpenSSH User's Guide
Secure shell ppt
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Spectroscopy.pptx food analysis technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Review of recent advances in non-invasive hemoglobin estimation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The AUB Centre for AI in Media Proposal.docx
Big Data Technologies - Introduction.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Chapter 3 Spatial Domain Image Processing.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectroscopy.pptx food analysis technology

Ssh and sshfp dns records v04

  • 1. Secure Shell (ssh) and SSHFP DNS Records (and Secure Copy - scp)
  • 2. “old” ssh For security, manually compare this fingerprint to shinkuro.com’s known ECDSA fingerprint... $ ssh bob.novas@shinkuro.com The authenticity of host 'shinkuro.com (66.92.164.104)' can't be established. ECDSA key fingerprint is c5:3c:97:64:e4:99:ba:21:1c:bf:46:35:8c:d3:48:a1. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'shinkuro.com,66.92.164.104' (ECDSA) to the list of known hosts. Password: Last login: Mon Jul 30 14:14:20 2012 from pool-108-28-91-61.washdc.fios.verizon.net bob.novas@linux:~> Next time you login, the fingerprint from shinkuro.com is compared to the fingerprint saved in .ssh/known_hosts (no user question unless the fingerprint doesn’t match). The $64,000 question: How do you get the “known ECDSA fingerprint” from shinkuro.com? 3/3/2014 2
  • 4. python program that gets the md5, sha1 and sha256 fingerprints from hashlib import md5, sha1, sha256 from base64 import b16encode, b64decode def main(): f = open("ssh_host_ecdsa_key.pub") line = f.read() parts = line.split() decodedKey = b64decode(parts[1]) h_md5 = md5(decodedKey).digest() h_sha1 = sha1(decodedKey).digest() h_sha256 = sha256(decodedKey).digest() b16_md5 = b16encode(h_md5).lower() b16_sha1 = b16encode(h_sha1).lower() b16_sha256 = b16encode(h_sha256).lower() print "md5 hash=%s" % (b16_md5, ) print "%s IN SSHFP 3 1 ( %s )" % (parts[2].split('@')[1], b16_sha1, ) print "%s IN SSHFP 3 2 ( %s )" % (parts[2].split('@')[1], b16_sha256, ) if __name__ == "__main__": main() 3/3/2014 4
  • 5. run the python program: And, here’s the number that matches shinkuro.com’s ECDSA key fingerprint and proves you’re talking to the right host. > main.py md5 hash=c53c9764e499ba211cbf46358cd348a1 linux IN SSHFP 3 1 ( 3406cfb84d4be7ec8e593382c92db207bc982ee2 ) linux IN SSHFP 3 2 ( cc71ddcdb0d212d6fb88fc3df349cdc64f9d36fbb12336fd0173e01429fc14ac ) But wait... you really had to get this number “out of band” from some authoritative source who vouches that they actually ran the python program on the “right” host. 3/3/2014 5
  • 6. The “new” ssh with SSHFP • now you need... – the host you want to login to must have signed SSHFP records with the host’s ecdsa sha1 and sha256 fingerprint (if it’s been recently updated to have ecdsa keys - if not, old ssh clients will work with rsa/dsa keys) – a DNSSEC aware resolver – a copy of a ssh client built with the –with-ldns option using a recent snapshot with the ecdsa code 3/3/2014 6
  • 7. host: signed DNS SSHFP records >dig +dnssec @127.0.0.1 shinkuro.com SSHFP ; <<>> DiG 9.8.1 <<>> +dnssec @127.0.0.1 shinkuro.com SSHFP ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6803 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 5, AUTHORITY: 4, ADDITIONAL: 4 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags: do; udp: 4096 ;; QUESTION SECTION: ;shinkuro.com. IN SSHFP ;; ANSWER SECTION: shinkuro.com. 14390 IN SSHFP 2 1 B6B102F02D6C791AAC26C7CCCD9F6C7290DC7B3F shinkuro.com. 14390 IN SSHFP 3 1 3406CFB84D4BE7EC8E593382C92DB207BC982EE2 shinkuro.com. 14390 IN SSHFP 3 2 CC71DDCDB0D212D6FB88FC3DF349CDC64F9D36FBB12336FD0173E014 29FC14AC shinkuro.com. 14390 IN SSHFP 1 1 295D4D75EF9BCC25BA55C98378313643853E06E0 shinkuro.com. 14390 IN RRSIG SSHFP 5 2 14400 20120911172329 20120802172329 51936 shinkuro.com. jSMtsJ 8Ff2bzHv524H8JlxFagdM+jiELbpLGjC4/YeBGd+J3gYF44Kiv ZvB93Fqlh0StQ6Z1MivXJAA2bweB4vkdC4Obktsk017XZKjebxBqkeZE 5tT50lSd/iCH 05qgcJ2hshzNeu0JRcDzHm2m4MVaKEKNZqlQVgrKixMJ pLk= 3/3/2014 7
  • 8. rebuild ssh client • Build a tip version of openssh (not the latest release!) – openssh-SNAP-20120802 – openssl 1.0.1.c – ldns 1.6.13 – recent openssh snapshot with option: --with-ldns • Make sure /etc/resolv.conf points to a DNSSEC aware resolver (e.g., not FIOS cable modem!) • check ~/.ssh/known_hosts is empty 3/3/2014 8
  • 9. login... $ ssh -o VerifyHostKeyDNS=yes bob.novas@shinkuro.com Password: Last login: Sat Aug 4 15:50:03 2012 from pool-108-28-91-61.washdc.fios.verizon.net Have a lot of fun... bob.novas@linux:~> or, set VerifyHostKeyDNS=yes in ~/.ssh/config: $ ssh bob.novas@shinkuro.com Password: Last login: Sat Aug 4 16:10:30 2012 from pool-108-28-91-61.washdc.fios.verizon.net Have a lot of fun... bob.novas@linux:~> 3/3/2014 9
  • 10. login with debug enabled $ ssh -v -o VerifyHostKeyDNS=yes bob.novas@shinkuro.com debug1: SSH2_MSG_NEWKEYS sent OpenSSH_6.1p1-snap20120802, OpenSSL 1.0.0e 6 Sep 2011 debug1: expecting SSH2_MSG_NEWKEYS debug1: Reading configuration data /usr/local/etc/ssh_config debug1: SSH2_MSG_NEWKEYS received debug1: Connecting to shinkuro.com [66.92.164.104] port 22. debug1: Roaming not allowed by server debug1: Connection established. debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: identity file /home/bob/.ssh/id_rsa type 1 debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: identity file /home/bob/.ssh/id_rsa-cert type -1 debug1: Authentications that can continue: publickey,keyboard-interactive debug1: identity file /home/bob/.ssh/id_dsa type 2 debug1: Next authentication method: publickey debug1: identity file /home/bob/.ssh/id_dsa-cert type -1 debug1: Offering RSA public key: /home/bob/.ssh/id_rsa debug1: identity file /home/bob/.ssh/id_ecdsa type -1 debug1: Authentications that can continue: publickey,keyboard-interactive debug1: identity file /home/bob/.ssh/id_ecdsa-cert type -1 debug1: Offering DSA public key: /home/bob/.ssh/id_dsa debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8 debug1: Authentications that can continue: publickey,keyboard-interactive debug1: match: OpenSSH_5.8 pat OpenSSH_5* debug1: Trying private key: /home/bob/.ssh/id_ecdsa debug1: Enabling compatibility mode for protocol 2.0 debug1: Next authentication method: keyboard-interactive debug1: Local version string SSH-2.0-OpenSSH_6.1 Password: debug1: SSH2_MSG_KEXINIT sent debug1: Authentication succeeded (keyboard-interactive). debug1: SSH2_MSG_KEXINIT received Authenticated to shinkuro.com ([66.92.164.104]:22). debug1: kex: server->client aes128-ctr hmac-md5 none debug1: channel 0: new [client-session] debug1: kex: client->server aes128-ctr hmac-md5 none debug1: Requesting no-more-sessions@openssh.com debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: Entering interactive session. debug1: expecting SSH2_MSG_KEX_ECDH_REPLY Last login: Sat Aug 4 16:09:24 2012 from pool-108-28-91-61.washdc.fios.verizon.net debug1: Server host key: ECDSA c5:3c:97:64:e4:99:ba:21:1c:bf:46:35:8c:d3:48:a1 Have a lot of fun... debug1: found 4 secure fingerprints in DNS bob.novas@linux:~> debug1: matching host key fingerprint found in DNS debug1: ssh_ecdsa_verify: signature correct 3/3/2014 ssh verifies fingerprint from host against fingerprint in signed DNS SSHFP record 10
  • 11. DNSSEC SSHFP records • work “automatically” to do something that is otherwise difficult to do – how do you get that fingerprint? • not quite ready for prime time: – older ssh clients won’t work with hosts signed with ECDSA keys even in fallback mode – must have recent snapshot – ssh-keygen doesn’t yet generate ecdsa keys with sha1 or sha256 hash – python program to generate fingerprints – ssh isn’t built (by vendors) with option –with-ldns – but you can build your own – ssh doesn’t use VerifyHostKeyDNS option by default (but, you can set it in config file) • all of this holds true for scp (secure copy) as well 3/3/2014 11