Professional Web Applications Themes

sftp script for application promotion - Linux / Unix Administration

Hi, I am new to sftp/ssh. I need to find a way to create and run an sftp script on a Solaris host, which can read input from a paramter file, for paths/directories/files to be migrated to another Solaris host, and execute the transfers. Also how can I avoid entering password interactively. Is there something like .netrc, or I have to use public_keys. If I need to use public_keys how may I use them? I read some posts onsome of the groups where they talk about public_keys ect, but I am totally new, and would appereciate if someone can guide ...

Sponsored Links
  1. #1

    Default sftp script for application promotion

    Hi,

    I am new to sftp/ssh. I need to find a way to create and run an sftp
    script on a Solaris host, which can read input from a paramter file,
    for paths/directories/files to be migrated to another Solaris host, and
    execute the transfers.

    Also how can I avoid entering password interactively. Is there
    something like .netrc, or I have to use public_keys. If I need to use
    public_keys how may I use them?

    I read some posts onsome of the groups where they talk about
    public_keys ect, but I am totally new, and would appereciate if someone
    can guide me in acomplishing this, given that I have minimal knowledge
    expereience of ssh.


    Thanks

    Omer

    Sponsored Links
    zubairom@gmail.com Guest

  2. #2

    Default Re: sftp script for application promotion

    com wrote: 

    As a simple guide...

    Ssh connects from one account to another remote account. You need to do
    some actions on both accounts before you can connect using keys.

    Local account
    On the sender account create your key (unless it exists already) using -
    ssh-keygen -t dsa
    It will prompt you for a passphrase. Press enter twice to have a blank
    passphrase.
    This produces two files ~/.ssh/id_dsa and ~/.ssh/id_dsa.pub
    cat the file ~/.ssh/id_dsa.pub out and select it so it is in the clipboard.

    Remote account
    Now in another session window, log into the remote account. Create the
    ~/.ssh directory and edit/create the file ~/.ssh/authorized_keys. Paste
    in the key from your clipboard. It should all be on one line.
    Make sure the authorized_keys file is owned by the remote account and
    set the permissions to 600.

    Test connection
    Now try to ssh from the sender account to the remote account
    ssh remoteaccountremotebox
    If this is the first time you have connected using this method then it
    will prompt you to confirm you accept this box is the correct one. You
    need to type in 'yes' in full. It 'should' then log you in without a
    password. Once this is working then you should also have a working sftp
    connection.

    Problems
    Ssh is very fussy about security and permissions etc. It may refuse to
    connect with a key if the remote account's home directory has incorrect
    permissions or for other reasons. If it refuses to connect then you can
    get more information about the problem by running sshd on the remote
    server using the command
    /usr/sbin/sshd -p 8081 -d
    and then trying the connection again but using the command
    ssh -p 8081 -v remoteaccountremotebox

    Notes: Depending on the UNIX platform, the path to sshd may be
    different. This method may not work for root accounts depending on the
    settings in the sshd_config file. Use another account.

    JohnK
    JohnK Guest

  3. #3

    Default Re: sftp script for application promotion

    Thanks John. This helped

    zubairom@gmail.com Guest

Similar Threads

  1. Help with Net::SFTP when sftp on unix works.
    By Ree-Yees in forum PERL Modules
    Replies: 1
    Last Post: September 21st, 07:39 PM
  2. web-promotion
    By Deepak in forum Macromedia Flash Sitedesign
    Replies: 3
    Last Post: September 21st, 04:17 PM
  3. Off Topic: Self Promotion
    By klmhicks@adobeforums.com in forum Adobe Photoshop Mac CS, CS2 & CS3
    Replies: 0
    Last Post: May 5th, 12:51 PM
  4. self promotion
    By Word of Mouth Productions in forum Macromedia Director Lingo
    Replies: 13
    Last Post: November 6th, 12:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139