Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle JRockit Virtual Edition
11g Release 1 (11.1.1.3.2)

Part Number E15206-04
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

5.3 Logging in to the SSH Service

After enabling the SSH service, you can log in by using either a password or a private key depending on the type of authentication enabled.

Note:

The command syntaxes provided in this section are specific to Linux-based SFTP and SCP clients. For information about the syntaxes to be used in other such third-party clients, see the documentation for those clients.

5.3.1 Logging in to the SSH Service Using a Password

To log in to the SSH service by using password-based authentication, perform the following steps:

  1. Start the virtual machine.

  2. Run the following command from the machine that you are using to establish an SSH connection with the virtual machine:

    • By using SFTP: sftp host

    • By using SCP:

      • To copy files from the file system of the virtual machine to the local machine:

        scp host:path_in_virtual_machine_file-system path_in_local_file-system
        
      • To copy files from the local machine to the virtual machine file system:

        scp path_in_local_file-system host:path_in_virtual_machine_file-system
        

    In this command, host is the name or IP address of the virtual machine to which you want to connect.

  3. At the prompt, enter the password.

    You can now use the standard SFTP or SCP commands to access and modify the file system of the running virtual machine.

    Note:

    Some changes (for example, modifications to jar and class files that are already loaded by the JVM) require the virtual machine to be restarted to take effect.

    The following message is displayed on the virtual machine console:

    INFO: session created by machine using password
    

    In this message, machine is the name or IP address of the client machine from which you established the SSH connection to the virtual machine.

5.3.2 Logging in to the SSH Service Using a Private Key

To log in to the SSH service by using key-based authentication, perform the following steps:

  1. Start the virtual machine.

  2. Run the following command from the machine that you are using to establish an SSH connection with the virtual machine:

    • By using SFTP: sftp -o IdentityFile=privatekey_file user_name@host

    • By using SCP:

      • To copy files from the virtual machine file system to the local machine:

        scp -i privatekey_file user_name@host:path_in_virtual_machine_file-system path_in_local_file-system
        
      • To copy files from the local machine to the virtual machine file system:

        scp -i privatekey_file path_in_local_file-system user_name@host:path_in_virtual_machine_file-system
        

    In this command, user_name is the user name that you must use to start the SSH connection, host is the name or IP address of the virtual machine to which you want to connect, and privatekey_file is the path and name of the file (on the local machine) that contains the private key.

  3. If you specified a passphrase while generating the keys, you must enter the passphrase at the prompt.

    You can now use the standard SFTP or SCP commands to access and modify the file system of the running virtual machine.

    Note:

    Some changes (for example, modifications to jar and class files that are already loaded by the JVM) require the virtual machine to be restarted to take effect.