Posts

Showing posts with the label ssh

Cisco: Authenticating with SSH public key on Cisco IOS devices

Using SSH public keys to authenticate on a Cisco IOS device The preferred way to authenticate on a network device is using a SSH key. If you don't have a SSH key already, take a look at the steps to generate a new key here . After the key is available, you have to connected to your Cisco device and install it. But, first of all, you need to make sure that SSH is enabled on your device. 1st Step - Enable SSH To enable SSH on your device, you have to define the domain name and hostname of the device. Also you need to generate the host keys and finally to enable ssh: Router> ena Router# configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router(config)# ip domain-name johnyc20.blogspot.ro Router(config)# hostname bucharest bucharest(config)# crypto key generate rsa The name for the keys will be: bucharest.johnyc20.blogspot.ro Choose the size of the key modulus in the range of 360 to 4096 for your   General Purpose Keys. Choosing a key m...

SSH: Generating and using SSH keys

Image
One of the preferred method of authentication on network devices is using SSH with a SSH public key. In order to be able to authenticate yourself, you have to generate a SSH key pair. A SSH key is composed of two parts, one private key (which should remain "private" and also should be password protected ) and one public key which should be installed on the SSH server in order to authenticate you. SSH client on Linux: In order to generate a SSH key pair on Linux, you will need to use "ssh-keygen" tool, which is a part of the "openssh-client" package on Debian-like operating systems: smocanu@debian7:~$ dpkg -S $(which ssh-keygen) openssh-client: /usr/bin/ssh-keygen or a part of "openssh" package on RedHat-like operating systems: smocanu@centos6 ~$ rpm -qf $(which ssh-keygen) openssh-5.3p1-94.el6.x86_64 The generating process is quite simple, just run the "ssh-keygen" command, and it will ask you the location of the new key ...