09-25-2017
It would be better, if you actually know the credentials of the root user, to connect and set up SSH keys to achieve this rather than trying to get round it with expect.
You have to decide on the target server if root is allowed to login, and this may be preventing you, and for a good reason too.
Clearly this is a dummy set up, so what are you actually trying to achieve? There are probably better ways rather than trying to crack in and shovel in direct commands. Think - If you can do it then so can someone else with different motives.
If you can describe what you need then we can probably help you find a much neater way to do this.
Kind regards,
Robin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
i am having two servers one is local and remote(FTP)server.from local server i have to connect to remote server and execute a shell script
i want to run a shell script(remote location) from my local server
i am having some knowledge on ftp but i am not getting the result .please give ... (2 Replies)
Discussion started by: srivsn
2 Replies
2. Shell Programming and Scripting
Hi,
Im creating a script that is supposed to run commands on remote server using sftp.
My script is as below:
#!/bin/ksh
sftp remote_server
mypassword
cd /u08/mydir/allfiles
mget *
..
But this is what I got when I runned the script:
Connecting to remote server...... (3 Replies)
Discussion started by: luna_soleil
3 Replies
3. Shell Programming and Scripting
Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies
4. Shell Programming and Scripting
Hi,
I have a script that runs for an hour.
Have to run it on remote server and need the output it produces on the remote server to decide for failure or success.
I run it through a Autosys Job which logs the outputs, both 1 & 2.
I use the commands
1) rsh <SERVER> 'nohup /tmp/xyz.ksh &'
2)... (5 Replies)
Discussion started by: aster007
5 Replies
5. Programming
Hi All,
I am using a expect script to run a shell script on remote server, the code is as follows. But the problem is that it executes only first command, and hangs it doesn't run the next commands.
spawn ssh $uid@$host
expect "password:"
send "$password\r"
expect "*\r"
send... (2 Replies)
Discussion started by: yashwanthsn
2 Replies
6. Shell Programming and Scripting
I am unable to run the below script against a remote server due to syntax error (then unexpected), but i am able to run it locally. Am i executing it correctly or is there any other way to execute it.
ssh username@servernname ksh -s < scriptname
#!/bin/ksh
function record
{
((end =... (5 Replies)
Discussion started by: NarayanaPrakash
5 Replies
7. Shell Programming and Scripting
I need to run a local shell script on a remote machine. I am able to achieve that by executing the command
> ssh -qtt user@host < test.sh
However, when I try to pass arguments to test.sh it fails.
Any pointers would be appreciated. (7 Replies)
Discussion started by: Sree10
7 Replies
8. Shell Programming and Scripting
Hi all,
i need to run a shell script on remote server. I have created file .bat file in windows server with following code,
c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh
i need to run the script.sh in my remote server
Above command is not working, any... (4 Replies)
Discussion started by: rammm
4 Replies
9. Solaris
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies
10. Shell Programming and Scripting
Hi guys,
So i am in server1 and i have to login to server 2, 3,4 and run some script there(logging script) and output its result. What i am doing is running the script in server2 and outputting it to a file in server 2 and then Scp'ing the file to server1. Similarly i am doing this for other... (5 Replies)
Discussion started by: srkmish
5 Replies
LEARN ABOUT NETBSD
bootparams
BOOTPARAMS(5) BSD File Formats Manual BOOTPARAMS(5)
NAME
bootparams -- boot parameter database
SYNOPSIS
/etc/bootparams
DESCRIPTION
The bootparams file specifies the boot parameters that diskless(8) clients may request when booting over the network. Each client supported
by this server must have an entry in the bootparams file containing the servers and pathnames for its root, area. It may optionally contain
swap, dump, and other entry types.
Each line in the file (other than comment lines that begin with a #) specifies the client name followed by the pathnames that the client may
request by their logical names. Names are matched in a case-insensitive fashion, and may also be wildcarded using shell-style globbing char-
acters.
The components of the line are delimited with blank or tab, and may be continued onto multiple lines with a backslash.
For example:
dummy root=server:/export/dummy/root
swap=server:/export/dummy/swap
dump=server:/export/dummy/swap
gateway=router:255.255.255.0
When the client named "dummy" requests the pathname for its logical "root" it will be given server ``server'' and pathname
``/export/dummy/root'' as the response to its RPC request.
netra[1-5]www* root=server:/export/jumpstart/netra_www
When any client with a name matching the pattern "netra[1-5]www*" requests the pathname for its logical "root" it will be given server
``server'' and pathname ``/export/jumpstart/netra_www'' as the response to its RPC request. As this example implies, this is useful for set-
ting up Jumpstart servers for Sun clients.
NOTES
The server does not default to the localhost, and must be filled in.
FILES
/etc/bootparams default configuration file
SEE ALSO
diskless(8), rpc.bootparamd(8)
BSD
February 28, 2002 BSD