09-18-2008
Also, I did a quick google search for "Sending Password with scp", and ran across this site:
sshpasswords[modp.com]
Here's what it had to say:
Quote:
#!/usr/bin/env expect -f # -*-tcl-*-
set timeout -1 # wait until done
# trick to pass in command-line args to spawn
eval spawn scp $argv
expect "password: $"
send "password\n"
# wait for regular shell prompt before quitting
# probably a better way using 'wait'
expect "$ $"
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Morning guys, I'm hoping you can advise me as to whether or not the following is possible.
Is there a way of firing off an scp command with a sudo user as the user?
e.g. I am logged onto server1 as smith, but want to pull files from server2 that I can only read as sudo jones.
In my mind it... (3 Replies)
Discussion started by: dlam
3 Replies
2. Shell Programming and Scripting
Hi
I'm a student who is studying system administration. I need to write a perl script to allocate disk quota to users. I'm using ubuntu and When I try to run edquota command in command line it says that Can't find file system with quota. pls help me. I tried to edit fstab. but didn't work.
... (1 Reply)
Discussion started by: piumali
1 Replies
3. Shell Programming and Scripting
A weird thing, happened today: When i do SCP from a remote server, file is not getting copied to here.
Application Server: Here is where i work, and have a login. I have several tweaks in .bashrc, and along with all those, today i called a PERL script from bashrc. So when ever i do scp from a... (4 Replies)
Discussion started by: thegeek
4 Replies
4. Shell Programming and Scripting
Hello,
I'm running a perl script to execute a program through my Unix command line. The program requires a user input but I want to automatically have perl input the string. Is there a way to do this?
Thanks (1 Reply)
Discussion started by: leonard2352
1 Replies
5. Shell Programming and Scripting
Hi,
cut -d: -f1,3 /etc/group >rpt.out
I have a doubt in perl. right i am getting list of group user id into rpt.out file. instead i need to store it as an array in perl script. could you please tell me how can i get list of user into an array in perl script..
thanks in advance. (1 Reply)
Discussion started by: solo123
1 Replies
6. UNIX for Advanced & Expert Users
Hi all,
I have root directory on server 1 say A and having sub directory B now my application generates output files and put in sub directory B.
now i need to transfer these files from server1 to server2 by scp which is having same directory structure A and sub directory B
I have tried... (2 Replies)
Discussion started by: tushar_spatil
2 Replies
7. Programming
Hi gurus,
I have a requirement where I need to remotely run a perl script as another user.
Running the script locally as the required user is fine, however I need to su with the script due to filesystem permission issues. I do not want to update permissions on the remote server due to security... (5 Replies)
Discussion started by: melias
5 Replies
8. Shell Programming and Scripting
Is it possible to open an executable file and pass user credentials through the
perl script. If yes Please do share the CPAN module names and the way to access the executable file.
For eg. I want to open the IBM LOTUS Sametime through my perl code
and pass the user credentials like... (1 Reply)
Discussion started by: giridhar276
1 Replies
9. Shell Programming and Scripting
Can someone help in writing some script through which I can transfer file (scp) from root user in abc server to crt user in hfg server and can give the crt user password in script itself so that it doesn't prompt me every time for password (4 Replies)
Discussion started by: Moon1234
4 Replies
10. Shell Programming and Scripting
Close duplicate thread. (0 Replies)
Discussion started by: denissi
0 Replies
LEARN ABOUT OPENSOLARIS
spawn.h
spawn.h(3HEAD) Headers spawn.h(3HEAD)
NAME
spawn.h, spawn - spawn
SYNOPSIS
#include <spawn.h>
DESCRIPTION
The <spawn.h> header defines the posix_spawnattr_t and posix_spawn_file_actions_t types used in performing spawn operations.
The <spawn.h> header defines the flags that can be set in a posix_spawnattr_t object using the posix_spawnattr_setflags() function:
POSIX_SPAWN_RESETIDS
POSIX_SPAWN_SETPGROUP
POSIX_SPAWN_SETSCHEDPARAM
POSIX_SPAWN_SETSCHEDULER
POSIX_SPAWN_SETSIGDEF
POSIX_SPAWN_SETSIGMASK
Inclusion of the <spawn.h> header can make visible symbols defined in the <sched.h>, <signal.h>, and <sys/types.h> headers.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
sched.h(3HEAD), semaphore.h(3HEAD), signal.h(3HEAD), types.h(3HEAD), attributes(5), standards(5)
SunOS 5.11 10 Sep 2004 spawn.h(3HEAD)