Programming :: Run The Scripts On Remote System Using Plink?

Nov 6, 2009

I want to run the scripts on remote system using plink. Here I am using pipes concept .I created two pipes And I want to handle the output and error in two different files. If host key (available in /.putty/sshhostkeys file) is not available or is not match then we will get "Store key in cache? (y/n)" message from child process into error file. If parent process reads this message then we will send "yes" if not then we will continue to next step and parent process will wait until exit child process .

In this bug case, host key did not match and response came late from child process into error file and parent process took it as host key already available and waiting for exit status of child process using waitpid(). But here "yes" did not send for running commands and exit the child process.Hence it is hanged at waitpid(). Please help me how to solve this issue.

I tried this in following way:

#include<stdio.h>
#include <unistd.h>
#include <sys/types.h>

[code]....

View 1 Replies


ADVERTISEMENT

General :: Call Putty/plink To Start A Remote SSH Script With User Input?

Jan 18, 2010

Execute putty to start a script on a remote linux server which requires user input The remote script does a read -p "Please enter name" NAME I can use plink to execute a script over SSH, the following attempts and problems are shown below :- Note the -load ns is to load a session that doesnt exist, ie ensure no defaults are used

1) plink.exe -load ns <ip_addr> -l <user> -pw <password> <script path/name> Problem) Doesn't allow/show user input, ie its non-interactive.

2) Add -t to allocate a pty :- plink.exe -t -load nc <ip_addr> -l <user> -pw <password> <script path/name> so now the user input can be seen, but I get Ctrl+H (^H) when backspace is pressed, ok if the user doesnt make a mistake!

3) Use putty instead with a saved session putty.exe -load "SavedSession" Get a new window opened, not a biggy, but not as nice. (b) saved session cannot be easily moved. (c) Get password prompt, cannot provide password like with plink, I know I know, use keys, but this is a closed, private network, and its easier not to bother with keys!I would like the SSH to execute in-line, that is from within the batch file/command line shell I am in, not prompt for username/password, run the linux script and allow prompts and delete/backspace to work.

View 5 Replies View Related

General :: Call Putty / Plink To Start A Remote SSH Linux Script With User Input

Jun 27, 2011

Seemingly simple question, which yields slightly undesired results. Execute putty to start a script on a remote linux server which requires user input The remote script does a read -p "Please enter name" NAME I can use plink to execute a script over SSH, the following attempts and problems are shown below :-
Note the -load ns is to load a session that doesnt exist, ie ensure no defaults are used

1) plink.exe -load ns <ip_addr> -l <user> -pw <password> <script path/name> Problem) Doesn't allow/show user input, ie its non-interactive.

2) Add -t to allocate a pty :- plink.exe -t -load nc <ip_addr> -l <user> -pw <password> <script path/name> Problem) Ok, so now the user input can be seen, but I get Ctrl+H (^H) when backspace is pressed, ok if the user doesnt make a mistake!

3) Use putty instead with a saved session putty.exe -load "SavedSession" Problem) (a) Get a new window opened, not a biggy, but not as nice. (b) saved session cannot be easily moved. (c) Get password prompt, cannot provide password like with plink, I know I know, use keys, but this is a closed, private network, and its easier not to bother with keys!

So ideally, I would like the SSH to execute in-line, that is from within the batch file/command line shell I am in, not prompt for username/password, run the linux script and allow prompts and delete/backspace to work.

View 1 Replies View Related

Ubuntu :: Use Sudo Without A Password For Non Interactive Login Using Plink ?

Jun 2, 2010

Before you say you shouldn't do that bla bla bla. I know why i shouldn't.

However i have a problem with running sudo commands from a non interactive command line script run using plink.

The automated script needs to use chown and give the current user ownership of some files and folders created by another user.

I can't use things like sudo -s etc as it requires that i enter a password.

I have setup public key authorization in order to login. Do i have to give the root user a password and log in as that. I would prefer not doing this but if that is the only solution i guess i'll have too.

View 4 Replies View Related

General :: Start Gqview From Windows Over SSH With Putty / Plink

Jan 10, 2010

I'm trying to figure out how to start/stop gqview remotely from a batch script on a windows machine. Stopping works with killall but starting gives me a
Code: Gtk-Warning **: cannot open display warning.
Is this because it tries to open a GUI in the terminal and if so how to solve this?

View 4 Replies View Related

General :: Copy And Paste Between Local System And The Remote System When Using Rdesktop?

Dec 22, 2010

On Linux I do:

rdesktop remotepc

How do I copy and paste between my local system and the remote system?

View 1 Replies View Related

Security :: Need Remote System Hardening GUI Tool / Possible To Use It Windows System?

Jan 20, 2011

Which is the best remote linux hardening GUI tool.Is it possible to use that tool from windows system?

View 8 Replies View Related

Software :: Verify Directory On Remote System Available To Local System

May 5, 2009

The code listed below is an excerpt from a script that I am writing. The goal is to verify that a directory on a remote server is available to the local system. If that is not the case, a log file is written, and all filesystems that were previous unmounted, are remounted on the local system.

Code:
# # Unmount all NFS mounts prior to the archive process.
umount -a -t nfs
# Mount the remote directory (NFS) prior to running the make_net_recovery script.
# Make sure there is a <remote server> folder located in the /mnt directory. If it is
# not already there, create one.
mount <remote server>:/<local system> /mnt/<remote server>

# Verify the remote directory (NFS) is available. This directory is needed
# as it is the destination for the iso images. If it is not available, stop
# here, and write the results to a log file.
df |grep <remote server> > /dev/null
RC=$?
echo $RC

if [ ${RC} -eq 0 ]
then
echo successful
else
echo not successful >> /tmp/make_net_backup.log && mount -a
exit
fi
Is the syntax shown above correct?

View 1 Replies View Related

Fedora Networking :: Cannot Ssh Into Remote System?

Jun 4, 2009

I have a computer that i set up for a friend, and tried to ssh into it for her to update it and add do maintenance for her, so that she doesn't get aggravated with trying to do it herself, but ssh hangs and times out. The firewall is set to allow ssh, and eth* is set as trusted by the firewall, and i have the correct ip, and the ssh service is running.

I can connect to my home computer from hers, which is setup the same way (in this regard), but not vice versa. She has no router; she is directly connected to the DSL modem.

View 14 Replies View Related

Ubuntu :: Getting Information About Remote System

Dec 31, 2010

I am trying to write a shell script which will give remote system version and list of installed applications and their versions as output. In this case remote system is windows xp and I have ip address, username and password of that machine.

View 2 Replies View Related

Installation :: How To Boot Remote System

Jan 7, 2010

How we can boot the system which is in remote place using our system? suppose if our system is in city A, and remote system is in city B which is far away eachother.

View 6 Replies View Related

General :: FTP From Remote Host To Local System?

Sep 27, 2010

I'm using Windows XP. I'm connecting to a UNIX box using putty SHH(ksh). Now I want to copy a text file present in remote host to my local system.

View 5 Replies View Related

General :: Enable The Remote Desktop In A Red Hat System?

Dec 6, 2010

How to enable the remote desktop in a Red Hat system?

View 4 Replies View Related

Ubuntu :: Remote Desktop Is Slow On System / Why Is So?

Jan 6, 2010

I have this network
desktop ultimate edition 2.4 (ubuntu 9.4)
laptop ubuntu 9.10
ethernet network
on ubuntu remote desktop is slow in general
on windows much faster !

is there anything special that I should do ?

View 5 Replies View Related

Ubuntu :: Remote Control Software For System?

Apr 29, 2010

I'm looking for something like Logmein or showmypc.comv

View 9 Replies View Related

Ubuntu :: Any Other Way To Access Any Remote Windows System

Feb 19, 2011

I am using ubuntu 10.10 netbook remix version. I want to access a remote computer outside my LAN which is running on Windows.I tried vinagre for the LAN but the result is that the client (running on windows) system goes logged off making the client completely unaware about what is going on with his system.Is there any other way to access any remote Windows system ans still the client able to see and interact while it has been accessed by ubuntu.

View 2 Replies View Related

Ubuntu :: Run A Remote Unix Session Using System?

Aug 2, 2011

At the moment I am using Hummingbird Exceed on a windows PC to display X windows from a Unix server. The actual Exceed tool I use is called 'hwm' which I believe is basically an pc based X Windows manager. I do not need to configure anything other than the client computer name, IP address and screen definition and the server will then allow a connection and display the X windows on the client. I was wondering if there is an equivalent application I can run using Ubunto as a client insted of a Windows PC?

View 1 Replies View Related

General :: Access Opensuse From A Remote System Using Ssh

Feb 3, 2010

me using opensuse. when i wnat to access it from a remote system using ssh.the following error occur. permition denied (publickey,keyboard interactive)

View 2 Replies View Related

Networking :: Connect Board To Remote System?

Mar 26, 2010

I have a arm board where qtopia installed. there is no ssh or scp installed . how can i connect my board to my linux desktop.

View 2 Replies View Related

General :: How To Get Remote PC's Running Operating System Name

Jun 21, 2011

I need to know what operating system currently running on given remote pc IP address.

View 4 Replies View Related

General :: Running Command On Remote System

Jun 29, 2010

I want to remote login as a non root user and then run a command under the root account.I have set up the ssh/scp for the non root user and this configuration works fine. What I dont know is how to run a command under root once remotly logged in as the non-root account.I have to run this command under root, it cannot be changed.

View 5 Replies View Related

General :: Get Files From The Remote System During Bootup?

Jun 22, 2010

i was browsing one of my friend hard drive using knoppix live CD, i was amazed to find that all the folder which he uses was empty, there was no files present in them, for example there was a folder in /usr/local named web, but when i browsed that folder using knoppix it was empty.I searched for files in every partition but still no result found.

After some time when i placed hard disk back and booted the PC normally, everything was in its proper place. Then i thought to make image of the hard drive and use it on my PC, the image booted well, but still those particular files were missing. I want to know how is that possible? Is there any way to get files from the remote system during bootup?

View 8 Replies View Related

Server :: Starting Serverice From Remote System

Aug 9, 2010

i try to write a script to start and stop jboss service from remote systems. starting and stopping jboss service is working fine on local system. when i try to start jboss service from remote system . i not able to start jboss service.

View 1 Replies View Related

CentOS 5 :: Remote Desktop Boot With System?

Mar 29, 2009

I am running a server (multipale roles). The base OS is Centos 5.2 and an xen kernel... The system is usually headless... Most of the work i do is also through terminal. However I have come across multiple situations that require me to visually have access. The problem I am running into is that the remote desktop built into the system dosent enable remote access to the system intill i have looged in on the system? What are my options? or is their a way to boot remote desktop with the system?

View 1 Replies View Related

Programming :: Remote Function With Pthread?

May 22, 2010

I wrote some code in c, using pthread (I configured the linker and compiler in eclipse IDE first).

Code: #include <pthread.h>
#include "starter.h"
#include "UI.h"
Page* MM;

[Code]....

View 6 Replies View Related

Programming :: SSH Remote To Local Chat?

Nov 14, 2010

I have the need to SSH into a Slackware 12 box to provide remote support. I got this, but it doesn't provide for a real 2-way communication.

while : ;
do read -p "Enter text to Local: " TXT ;
DISPLAY=:0 Kdialog --inputbox "$TXT" ;
done

So this loops and all, but it doesn't have a history and I have to wait for a return from the Local operator. If the operator has changed focus I can be waiting all day for a response and I would have to start another session to post a second comment.

What is nice is that it's small and I can create the .sh when I remote in.

-----Update since I started

I now have two scripts to take over from the first one. I have to have 4 SSH running to get this to work.

1 SSH to move(archive) and create a chat.txt; it also fires off a .sh that fires off a console that tails a chat.txt so the operator can see the chat history
2nd SSH to fire off a .sh that loops a Local kdialog input box that appends the chat.txt 3rd SSH to tail -f the chat.txt file on the remote so I can see the chat history 4th SSH to loop a read -p on the SSH so I can append the chat.txt

View 5 Replies View Related

Programming :: Variables With Spaces In Remote Ssh?

Nov 22, 2010

I'm writing something which takes user input (which may or may not contain spaces...) and then runs a command on a remote system via ssh. However the remote command does not work. I can't print the exact code so I'll just provide an equivelenat problem. This needs to work with filenames which do and do not contain spaces.

Code:
FILES=`ls`
echo "Specify a file"
echo "$FILES"
echo -n "File name: "
read $FILES
ssh root@127.0.0.1 "ls $FILES"

View 5 Replies View Related

General :: Security - Remote Into System Workstation Behind A Firewall?

Apr 22, 2011

Let's say I have a Linux workstation at work, behind a firewall. So even though I may have a remote access server set up on it (such as the most excellent NoMachine NX Server), I can't access it from home.

My home network happens to have a Linux server. Is it possible to ssh from work to the home Linux machine and set up a tunnel so that once I'm at home, I can run the NX client, point it to my home Linux box on some port like 9000, and have that forward through the tunnel to port 22 on my work Linux box? How would I set this up?

View 2 Replies View Related

Ubuntu Networking :: Remote Application Invocation From Win System?

Feb 23, 2011

I have installed a bioinformatics tool called Pathway Tools on ubuntu 10.10, and I'm trying to access it through ssh client from windows vista client system. my client is puTTY. I can run the terminal shell, and I log in and everything goes alright. However, when I run the program by typing the following:pathway-tools from the directory of the tool. just like I'm running it from ubuntu directly. I get the following message:

Code:
aibig@aibig-HP-xw4400-Workstation:~/pathway-tools$ ./pathway-tools
Warning: Constant **&-TAG-MAPPING-LIST** being redefined from
(("alpha" SYMBOL T "a") ("beta" SYMBOL T "b")
("gamma" SYMBOL T "g") ("delta" SYMBOL T "d")
("epsilon" SYMBOL T "e") ("zeta" SYMBOL T "z")

[Code]...

Enter name of X-window server to connect to (of the form HOST:N.M): You can ignore all the warnings, all my problem is at the last line. I searched the internet to know what does they mean by HOST:N.M value the shell requests, but in vain. I'm really a newbie to ubuntu, but I'm getting familiar day by day and I'm loving it.

View 1 Replies View Related

General :: Remote Desktop Version 6 For System (Microsoft RDP V6)?

Aug 14, 2009

I'm trying to connect to a Win XP computer via Remote Desktop/Terminal Server. (Note: WinXP refers to Remote Desktop, or RDP; Ubuntu uses Terminal Server client for this function.)

The problem is that my XP computer requires the use of Microsoft's RDP version 6 because it uses a Terminal Server Gateway. The TS client in Ubuntu is compatible with version 5, not version 6.

Is there a MS RDP version 6 compatible program/client for Linux?

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved