• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

SFTP in unix shell script

 
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everybody,

I know how to use ftp but i dont know how to use sftp.

I tried many times but unsuccessful

I searched in the google but couldn't get good appropriate stuff which is useful for me.

Please can any one help me how to use "sftp" in shell script

can any one provide me sample script

Please help me out!

Thanks!
Sai
 
Saloon Keeper
Posts: 27478
195
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To use SFTP, you need to be talking to an sftp-enabled server.

I normally use SCP myself, it requires that the receiving server be ssh-enabled and that you have a shell login.

SCP commands are fairly simple:

scp fromfile user@toserver:tofile

user and tofile are optional, as the defaults are your current user id and fromfile's filename, but if you forget the ":", scp will think you're just doing a local copy to a "tofile" named "toserver".

tofile is normally relative to "user"s home directory, but you can also copy to an absolute location on the serve, provided your account has appropriate security privileges.
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NO boss
I need SFTP stuff that too with out interating with user while connecting to the server.
dont worry about ftp server.
I have ftp server :-)

Please help me out if any one knows about how to connect to ftp server using sftp (non-interactive)


Thnaks
sai
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Ganymed library implements SSH, SCP and SFTP. It's used in client applications such as Cyberduck, so I would imagine it to be rock-solid.
 
No, tomorrow we rule the world! With this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic