08-14-2009
ssh keys provide passwordless access. ssh is NOT designed to allow -b to have a password in the batch file. As you leanred. You can probably find a workaround by writing a daemon with controlling terminal, but why do that? ssh has keyts for the purpose.
IF this does not suit you use ftp, It does allows passwords in a script.
The reason for this - hardcoded passwords are a major security problem.
10 More Discussions You Might Find Interesting
1. Cybersecurity
Hi,
How can I specify a password on the scp command line so that it should not prompt for the password?
Shabu (3 Replies)
Discussion started by: shabu
3 Replies
2. UNIX for Advanced & Expert Users
Hi,
I've some existing scripts wherein am using ftp + .netrc. I've defined my macros in .netrc file.
I want to switch to sftp now but it seems it doesn't support macros and .netrc and it gives "command invalid" error.
Is there any other alternative?
Note: I don't want help for... (1 Reply)
Discussion started by: ps51517
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am entering this line in a .sh
sftp -b operacionesftp.batch ${USER_FTP_SALIDA}@${FTP_SALIDA}
but it seems to take only "b" and not "-b" may be due to?
Greetings. (0 Replies)
Discussion started by: pepeli30
0 Replies
4. Shell Programming and Scripting
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
while read line
do
if ; then
echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt
fi
done< files.txt
sftp -b sftpCommand.txt stu@192.168.2.1
The above... (1 Reply)
Discussion started by: noobrobot
1 Replies
5. Shell Programming and Scripting
Hi Freinds,
I need to transfer the files from the Remote server using SFTP. While i transfer the file, the time stamp of the file need not to be changed. Ineed to transfer the file as without change in its time stamp.
Is the any option or commands available. pl let me know...
Regards,... (3 Replies)
Discussion started by: C_PRASANNA
3 Replies
6. Red Hat
What is wrong with this sftp command being used in one line:
sftp /Data/SEmisstn.gz lsmsadit@144.226.213.23:/test/lsms.SEmisstn.gz
The ssh key is already setup. The node is valid and i can ssh to it as well as do a manual step by step sftp to the server. However, for some odd reason, i... (10 Replies)
Discussion started by: mrn6430
10 Replies
7. UNIX for Advanced & Expert Users
I need to run a test SFTP command in a batch mode and what I need to prompt my password after the sftp userid@hostname. I do not have have an ssh key exchanged between my server and the external server. I only have access to it as an sftp server. I must enter my password in my script. How do i... (2 Replies)
Discussion started by: mrn6430
2 Replies
8. UNIX for Beginners Questions & Answers
Hi All,
This is JCL that contain command script to copy file to destionation (UNIX)
I have 2 questions.
*********
//NATTOUT1 JOB ACCL,'XXXXYYYY',CLASS=A,MSGCLASS=X,
// NOTIFY=&SYSUID,REGION=0M,USER=SFTPXXX
// SET... (1 Reply)
Discussion started by: getandput
1 Replies
9. Shell Programming and Scripting
Is there any way I can pass -f with rm command in sftp? If I use it it treats -f as a file name to be removed.
sftp> rm -f abcd
Couldn't stat remote file: No such file or directory
Removing /home/sdesai/-f
Couldn't delete file: No such file or directory
sftp> "rm -f" abcd
Invalid... (2 Replies)
Discussion started by: Soham
2 Replies
10. Shell Programming and Scripting
Hi Team,
i need to capture the file creation date and time ,but i tried ls -l only working .
Cloud please help me to display year month data and time.
Thanks,
Murali (1 Reply)
Discussion started by: bmk123
1 Replies
LEARN ABOUT OSX
ssh-keysign
SSH-KEYSIGN(8) BSD System Manager's Manual SSH-KEYSIGN(8)
NAME
ssh-keysign -- ssh helper program for host-based authentication
SYNOPSIS
ssh-keysign
DESCRIPTION
ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication with
SSH protocol version 2.
ssh-keysign is disabled by default and can only be enabled in the global client configuration file /etc/ssh/ssh_config by setting
EnableSSHKeysign to ``yes''.
ssh-keysign is not intended to be invoked by the user, but from ssh(1). See ssh(1) and sshd(8) for more information about host-based authen-
tication.
FILES
/etc/ssh/ssh_config
Controls whether ssh-keysign is enabled.
/etc/ssh/ssh_host_dsa_key
/etc/ssh/ssh_host_ecdsa_key
/etc/ssh/ssh_host_rsa_key
These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, read-
able only by root, and not accessible to others. Since they are readable only by root, ssh-keysign must be set-uid root if host-
based authentication is used. Note that ssh-keysign is not set-uid by default on Mac OS X.
/etc/ssh/ssh_host_dsa_key-cert.pub
/etc/ssh/ssh_host_ecdsa_key-cert.pub
/etc/ssh/ssh_host_rsa_key-cert.pub
If these files exist they are assumed to contain public certificate information corresponding with the private keys above.
SEE ALSO
ssh(1), ssh-keygen(1), ssh_config(5), sshd(8)
HISTORY
ssh-keysign first appeared in OpenBSD 3.2.
AUTHORS
Markus Friedl <markus@openbsd.org>
BSD
August 31, 2010 BSD