
- #Copy log file from ssh how to
- #Copy log file from ssh software
- #Copy log file from ssh password
Observe that the Nexus does not prompt for a password to log in to the SFTP server and transfer the file to the bootflash of the Nexus.įoo pts/0 Sep 19 23:18.
Confirm that you are logged in to the "foo" user account then try to copy the "test.txt" file from the aforementioned SFTP server. This SFTP server has a "text.txt" file present at the absolute path ~]$ cat ~]$ hostname ~]$ ~]$ ls | grep test.txt Note: This example uses an SFTP server accessible at 192.0.2.10 in the management VRF with the "foo" user account's public key added as an authorized key. Confirm that you can use the "foo" user account's SSH key pair to copy files from a remote server. Rsa Keys generated:Thu Sep 5 01:50:43 2019ĪAAAB3NzaC1yc2EAAAADAQABAAABAQDn+7nOJN8aF0i2NHSnmChHi+lujltuxf6MHtSfiKQWYCz7N13of0U4quIDGODLZEXzic+N655me3MsnxzvyUwXz2XNQtjqdbmPVfWnmoXiSmWQ82qfDADtnWBEX8krVhypS5ny4+lG6m0S+yMtNuAvppBgLpT4weSUUFWnU7DcxOzlebe9ku/0Y4JARhOZlR0bAVC0qknsd/4+2ngmcXjKqMBtNPuVESAaddFS5enED0RJRveqY/mte/h6NUQfuzGk2COk4hh4LCslRtEsxB1+QhCasN7u7o+MJR3nV9pfKwj3qwjWt2iL5gRukj/c6UdMZ4d0+QLEofttBMp/y2NV Verify that the SSH key pair was imported to the "foo" user account successfully. N9K(config)# username foo keypair import bootflash:foo rsa forceįollow this procedure to verify the SSH Passwordless File Copy feature for AAA-authenticated user accounts. Import the desired SSH public and private key pair for this account.
Sshd:x:15:6:sshd:/var/sshd:/isanboot/bin/nobash If it does exist, delete the "foo" user account.įtp:*:15:14:ftp:/var/ftp:/isanboot/bin/nobashįtpuser:*:99:14:ftpuser:/var/ftp:/isanboot/bin/nobash
Enter the Bash shell and verify whether the "foo" user account already exists. Enable the Bash shell if it is not enabled already. When you follow the instructions in this procedure, replace "foo" with the actual name of the AAA-authenticated user account that you want to configure for use with the SSH Passwordless File Copy feature. This procedure uses "foo" to represent the name of an AAA-authenticated user account. Configure Configure SSH Passwordless File Copy Feature for AAA-Authenticated User Accounts This document demonstrates a procedure that allows an SSH public and private key pair to be imported into an AAA-authenticated user account so that the key pair persists on reload. When performed on AAA-authenticated user accounts, the SSH public and private key pair will not persist if the device is reloaded for any reason. However, this procedure does not work as expected for user accounts that are authenticated via an AAA protocol, such as RADIUS or TACACS+. This feature enables a local user account to use SSH-based protocols such as Secure Copy Protocol (SCP) and Secure FTP (SFTP) to copy files from a remote server to the Nexus device. #Copy log file from ssh how to
The "Configuring SSH and Telnet" chapter of the Cisco Nexus 9000 Series NX-OS Security Configuration Guide describes how to configure the SSH Passwordless File Copy feature for user accounts that are created through NX-OS configuration on Cisco Nexus devices. If your network is live, make sure that you understand the potential impact of any commands. All of the devices used in this document started with a cleared (default) configuration. The information in this document was created from devices in a specific lab environment.
#Copy log file from ssh software
This software was used to act as an SCP/SFTP server:
Nexus 3000 platform NX-OS Release 7.0(3)I7(6) or later. Nexus 9000 platform NX-OS Release 7.0(3)I7(6) or later. The information in this document is based on these software and hardware versions: Note: The procedure to generate an SSH public and private key pair is platform-dependent and is outside the scope of this document. You must have an existing SSH public and private key pair to import. You must perform this procedure from a user account that holds the "network-admin" role. Refer to the "Accessing Bash" section of the Bash chapter in the Cisco Nexus 9000 Series NX-OS Programmability Guide for the instructions to enable the Bash shell. The Bash shell must be enabled on the Cisco Nexus device. This document describes how to use an SSH public and private key pair to configure the SSH Passwordless File Copy feature for Cisco Nexus 9000 user accounts that are authenticated with Authentication, Authorization, and Accounting (AAA) protocols (such as RADIUS and TACACS+).