Configuring SFTP for Remote Access (CLI)

Use the following procedure to configure SFTP for remote access.
  1. Create a local user or network user (LDAP or NIS) with an appropriate administrator role. (See Configuring Users.)
  2. Generate an SSH authentication key by entering the command ssh-keygen -t dsa on the Oracle Solaris host/client.
  3. Enter a file name in which to store the key.
  4. Enter a passphrase if required, or leave this field blank to log on directly to the SFTP share.

    The location is displayed for the key. The key looks similar to the following:

    ssh-dss AAAAB3NzaC1kc3MAAACBAPMMs5h8UWk1NPf/VJDDEo0OAwT+s6iZxkCmmrgAmLfTX9izWk+
    bsvNldOlXN/6EgkusLjo/+UaEt5+704vMHClRaq3AlVHLS5tVjeX3iCs+fDo0qwXZg3Brh8QBAaWk3
    ywr2osuII1tHh4v/HwEAHZq5mVWXav0pO3bgmxl0/+VAAAAFQDIJxnm52DfyEdQQMTY+jRVvzGwMQA
    AAIAhTP6Ey+2gGFiCKkvUofsco4d8pbqH8duE9P6Y88s0+opuj52GkAdRUt2fRrdM9Cf3h4lIOc8Bw9
    bZIBzrCKBNWBUdZG56tsfLdilW6vS6gxKrmL2v7fSp9WYPsxZGhOLfU29zW4n2WVcVHbGyFEoVe+taq
    aq+AYJaWoHnjZL1/LpQAAAIAOLc8+uc3hDOcK3pAkYdg8b2rYIGOAZU4py0rq24DGPeVHd5h5jbe4p
    WDM70uYqGCOPYiOKeEoMNJpczRX5qjI+BfoUY4sH24WWwsKkT8XX9PUAa0WT+7axEqg2N6YelaTJ95J
    vMaj6E7HkAIra2Sj2H/LSDktL42UL+j1Wx5A==username sunray
  5. From the Configuration menu, select Services, then SFTP. Under Keys, click the plus (+) sign.
  6. In the New Key window, select DSA.
  7. Copy only the key portion (in the previous example, the key begins with AAAA and ends with Wx5A==), and paste it into the Key field.

    Note:

    The key should not contain any white (negative) spaces.
  8. Enter the user name, and add a comment as a reminder.
  9. From the Shares menu, select Shares, and click the add item icon image showing the add icon to create a filesystem.
  10. In the Create Filesystem window, enter the filesystem name (for example, sftp), change the permissions to Read/ Write for the share, and click APPLY.
  11. Click the edit icon image showing the edit icon to set up the share properties. (See Filesystem Properties.)
  12. To access the share, use the sftp command as shown in these examples:
    sftp -o "port=218" username 10.x.x.151:/export/sftp
    Connecting to 10.x.xx.151...
    Changing to: /export/sftp
    sftp>

    Example with -v option:

    sftp -v -o "IdentityFile=/home/username/.ssh/id_dsa" -o "port=218"
    root 10.x.xx.151:/export/sftp