To enable a client application to use the SSH protocol to connect to the JUNOScript server, perform the following steps:
If the application uses the JUNOScript Perl module provided by Juniper Networks, no action is necessary. As part of the installation procedure for the Perl module, you install a prerequisites package that includes the necessary SSH software. For instructions, see Downloading the JUNOS Module and Sample Scripts.
If the application does not use the JUNOScript Perl module, obtain the SSH software and install it on the computer where the application runs. For information about obtaining and installing SSH software, see http://www.ssh.com and http://www.openssh.com.
- % ssh-keygen options
- [edit]
- user@host# edit system login user account-name authentication
Issue the following command to copy the contents of the specified file onto the routing platform:
- [edit system login user account-name authentication]
- user@host# set load-key-file URL
URL is the path to the file that contains one or more public keys. The ssh-keygen command by default stores each public key in a file in the .ssh subdirectory of the user home directory; the filename depends on the encoding (DSA or RSA) and SSH version. For information about specifying URLs, see the JUNOS CLI User Guide.
Alternatively, you can include one or both of the ssh-dsa and ssh-rsa statements at the [edit system login user account-name authentication] hierarchy level. We recommend using the load-key-file statement, however, because it eliminates the need to type or cut and paste the public key on the command line. For more information about the ssh-dsa and ssh-rsa statements, see the JUNOS System Basics Configuration Guide.
- [edit system login user account-name authentication]
- user@host# top
- [edit]
- user@host# set system services ssh
- [edit]
- user@host# commit