- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Networking
- >
- SCP and SFTP Configuration
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2009 01:44 AM
тАО02-03-2009 01:44 AM
SCP and SFTP Configuration
would anyone please let me know. thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2009 01:48 AM
тАО02-03-2009 01:48 AM
Re: SCP and SFTP Configuration
for Windows client use Pageant and psftp from here - http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2009 02:10 AM
тАО02-03-2009 02:10 AM
Re: SCP and SFTP Configuration
as i mentioned earlier i need to do the changes from hpux to windows...but in the link you have provided me its for two unix machine. and i am not able to understand which are the steps i need perfom on windows or linux server... as far as i understand i belive i need to genrate the key -
$ ssh-keygen -t dsa
and copy this key to windows server.
because the movement is from windows to unix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2009 03:42 AM
тАО02-03-2009 03:42 AM
Re: SCP and SFTP Configuration
Decide which user is going to perform the file transfer on hp-ux.
Login as that user.
Generate the public key using the following command ssh-keygen -t dsa.
Copy the id_dsa.pub file from ~/.ssh directory and save it on windows server.
Remember to change the ownership and permission as per windows sftp server requirement.
Schedule the cronjob to put the files on windows server or to get the files from windows server as per your requirement.
Hope this helps
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2009 04:17 AM
тАО02-03-2009 04:17 AM
Re: SCP and SFTP Configuration
Thanks for the replay, however are you aware where to save the id_dsa.pub on windows server.
Also, do you have any sample script which will put the file on windows server using both SCP and SFTP. thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2009 04:59 AM
тАО02-03-2009 04:59 AM
Re: SCP and SFTP Configuration
I am really not sure where to copy the public key on windows server and what should be the file name. If it is a unix server you need to copy/append as authorized_keys under ~/.ssh directory. You need to refer the windows sftp server manual documnet.
Here you can see the sample script which use sftp to put the file. You need to customise as per your requirment.
---------------------------------------------
LOG=/var/ftp/abc/log
TODAY=`date +'%d%b%y'`
echo "`date +'%d%b%y %T'`" >> $LOG
#-------------------------------------------------------
# Check if Any files exist for sftp transfer and convert
with ux2dos before transferring
#-------------------------------------------------------
fn=`ls /var/ftp/abc/incoming/`
if [ ${fn:-NO} = "NO" ];
then
echo "No file" >> $LOG
exit
else
echo "Files to send: $fn" >> $LOG
/usr/bin/ux2dos /var/ftp/abc/incoming/$fn > /var/ftp/abc/incoming/$fn.DOS
#-------------------------------------------------------
# Connect to "10.110.115.120" server and put the files
#-------------------------------------------------------
sftp sftpuser@10.110.115.120 <<**
lcd /var/ftp/abc/incoming
put $fn.DOS
**
#-------------------------------------------------------
# Cleanup and copy them to archive for backup
#-------------------------------------------------------
cd
mv incoming/$fn /var/ftp/abc/archive/$fn.$TODAY
compress /var/ftp/abc/archive/$fn.$TODAY
rm /var/ftp/abc/incoming/$fn.DOS
fi
-------------------------------------------------------
The above script assumes that /var/opt/abc is the home directory of unix user and you are having the files to be transferred under incoming directoy. Also you can ignore ux2dos command if you don't need that. This is necessary if you are going to read the file as dos format on windows machine.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2009 07:39 AM
тАО02-03-2009 07:39 AM
Re: SCP and SFTP Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-04-2009 04:15 AM
тАО02-04-2009 04:15 AM
Re: SCP and SFTP Configuration
You can use SCP instead of SFTP. You will have to modify the script as per your requirement. That's it you are done.
Make sure that passwordless authentications is working before you schedule the job.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-04-2009 06:22 AM
тАО02-04-2009 06:22 AM
Re: SCP and SFTP Configuration
1. Add an entry to /etc/fstab on the Unix Box for the Microsoft server
### Syntax of FSTAB
//REALIP/MS-SHARENAME /unixmountdir cifs user,password=ms-passwd,ip=realip,username=ms-username 0 0
Then you can define a cron job that copies from one location to the 2nd..
In order to use secure copy from Unix to Microsoft you would have to define an SSHD service on your microslop box, this starts adding way to much into the equation
The CIFS mounted directory is the way to go.
My syntax for a scripted solution would be
cp -p unixdir/filename /mountpointname/directory/filename
You will need to determine the correct permission definitions to allow the CIFS mount to occur 1st. then the copy is as simple as copying from locationA to LocationB