==== Cisco IOS SSH SCP Key Authentication ====
{{tag>Cisco IOS ssh-key-auth}}
Due to character limits on the IOS CLI you will need to have the RSA public key on multiple lines. I put a new line every 60 characters to make it easy to read. Also keep the starting "ssh-rsa" and ending "USER01@HOST01".
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCr1zGV1ZDUOgHOWHrqhA
MJ0jyNlAGil130lS5lLizG0RqxG4Z9u3tbuRRkr3zsloqAt40N3zq22IZD
+ARJ4hDiRpV5f4H3rfB5WGJ8saPCqwZh8MG3s12HkQ01kFdtxQklPcmPOz
/FzTnGbEiOm1LbcVUtW4yqZX/cONIzS4q1fDCOa/G4Ocg89BPSSlXBN9+D
e6lc2MI14Ony5QUoZskkBEPJ8K4uosuhmEQzrLbis5cOpPD/z37+p3wfrQ
b3Gv6nNve7V1z1T24Y+ETK1TXPB/jVzzTWXkF15gyG6zJ7864m3xPrnTLl
QDz6dZ5CYDXZzuTMczGTQEGBF2dnzq1x USER01@HOST01
ISR01(config)#username USER01 privilege 15 secret USER01SECRET
ISR01(config)#ip ssh pubkey-chain
ISR01(conf-ssh-pubkey)#username USER01
ISR01(conf-ssh-pubkey-user)#key-string
ISR01(conf-ssh-pubkey-data)#ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCr1zGV1ZDUOgHOWHrqhA
ISR01(conf-ssh-pubkey-data)#MJ0jyNlAGil130lS5lLizG0RqxG4Z9u3tbuRRkr3zsloqAt40N3zq22IZD
ISR01(conf-ssh-pubkey-data)#+ARJ4hDiRpV5f4H3rfB5WGJ8saPCqwZh8MG3s12HkQ01kFdtxQklPcmPOz
ISR01(conf-ssh-pubkey-data)#/FzTnGbEiOm1LbcVUtW4yqZX/cONIzS4q1fDCOa/G4Ocg89BPSSlXBN9+D
ISR01(conf-ssh-pubkey-data)#e6lc2MI14Ony5QUoZskkBEPJ8K4uosuhmEQzrLbis5cOpPD/z37+p3wfrQ
ISR01(conf-ssh-pubkey-data)#b3Gv6nNve7V1z1T24Y+ETK1TXPB/jVzzTWXkF15gyG6zJ7864m3xPrnTLl
ISR01(conf-ssh-pubkey-data)#QDz6dZ5CYDXZzuTMczGTQEGBF2dnzq1x USER01@HOST01
ISR01(conf-ssh-pubkey-data)#^Z
ISR01#show run | begin pubkey-chain
ip ssh pubkey-chain
username USER01
key-hash ssh-rsa D1F51F41C221F6C17BC8F49899C91CB5 USER01@HOST01
quit
ISR01#
scp ISR01:system:/running-config ./ISR01.running-config-DATE.txt