Results 1 to 4 of 4

Thread: ftp/scp username/password via script

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Posts
    417

    ftp/scp username/password via script

    Hi,

    I was wanting to ftp or scp a file from a windows or linux bux over to a linux box via scp or ftp (pref scp) however when connecting, it will obviously ask for a password. how can I do all this at once? -B option for scp won't work.
    I heard of a way to cache the certificate in ssh so it doesn't require a password or something like that?. Does anyone know a link that shows how to do this. The two machines will be on a local LAN and not passing out of our network.

    thanx,

  2. #2
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811

    Re:ftp/scp username/password via script

    If it's between two linux boxes, then do:
    Code:
     source.server $ > ssh-keygen -t rsa   
      (Dont put in any password when asked)
     source.server $ > ssh-keygen -t dsa
      (Dont put in any password when asked)
     source.server $ > scp .ssh/id_[rd]sa.pub target.server:
     source.server $ > ssh target.server.com
     target.server $ > cat id_dsa.pub >> .ssh/authorized_keys2
     target.server $ > cat id_rsa.pub >> .ssh/authorized_keys
    And you dont need any password when connecting from source.server to target.server.
    Altho I have no idear if this will work with windows<->linux situations.

  3. #3
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:ftp/scp username/password via script

    [quote author=Blaqb0x link=board=9;threadid=4471;start=0#44683 date=1028619665]
    Hi,
    I was wanting to ftp or scp a file from a windows or linux bux over to a linux box via scp or ftp (pref scp) however when connecting, it will obviously ask for a password. how can I do all this at once? -B option for scp won't work.thanx,
    [/quote]

    ncftp has options for specifying usernames and passwords. Have you tried that?

  4. #4

    Re:ftp/scp username/password via script

    ncftp can take a password from its command line

Similar Threads

  1. NFS mounts with different username
    By svar in forum Linux - General Topics
    Replies: 5
    Last Post: 01-20-2011, 12:13 PM
  2. Fedora 8 username and password
    By hedleyq in forum Redhat / Fedora
    Replies: 4
    Last Post: 03-28-2008, 01:27 AM
  3. opennms username,passwd
    By pavangogineni in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 02-14-2006, 07:26 AM
  4. username => uid and vice versa (C)
    By gorn in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 10-01-2002, 04:22 AM
  5. Slackware Username
    By -JhAzEr- in forum Linux - General Topics
    Replies: 3
    Last Post: 09-19-2002, 03:31 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
  •