Sponsored Content
Top Forums Shell Programming and Scripting Input to while loop in remote machine using ssh Post 302930499 by nanz143 on Monday 5th of January 2015 04:45:41 AM
Old 01-05-2015
Appologize for late reply.. was out station on an emergency....
RudiC, i tried your commands,
Code:
ssh  server1 <<-EOF         
set -vx        
 ps -ef | grep bash | awk '{print $1}'        
 a="`ps -ef | grep bash | awk '{print $1}'`"        
 echo "\$a"        
 EOF

There is no error msg.. i just get blank echo....

Also, I need to get multiple pids,
How ever we can use the below command
Code:
a=$(ssh server1...)

but as you said it is not suggestible for multiple variables.

Hello Ravi, I am expecting to assign and kill pids in a single ssh session.

Pl suggest,

Last edited by nanz143; 01-05-2015 at 09:35 AM.. Reason: formating
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

executng program on remote machine using ssh

I am trying to search and remove files from a list of servers. I want to find every occurence of this file on each machine and then remove it. If I execute the find command on the remote machine I would like to be able to pipe the output to xargs and remove the file. Does anyone know hat would be... (1 Reply)
Discussion started by: sewood
1 Replies

2. Shell Programming and Scripting

ssh connection from remote machine in solaris

Hi! I have two solaris 10 machines(say 10.1.1.1,10.1.1.2). i have installed rsync on 10.1.1.2, 10.1.1.1::: Sun Microsystems Inc. SunOS 5.10 Generic January 2005 -bash-3.00$ ssh 10.1.1.2 "echo $PATH" Password:... (4 Replies)
Discussion started by: dddkiran
4 Replies

3. Red Hat

Unable to SSH into machine - ssh_exchange_identification: Connection closed by remote host

For a few days now I have been experiencing issues when trying to SSH into 1 of my machine. I get the following output when running 'ssh -vvv': server1:/home/mymadq> ssh -l root -vvv server2 OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 debug1: Reading configuration data /etc/ssh/ssh_config... (3 Replies)
Discussion started by: jaapar
3 Replies

4. UNIX for Dummies Questions & Answers

ssh to remote machine with 2nd user and password

Hi all, Really hope someone can help me, i have been trying lots of things and just cant seem to nail it - and for something that seems straight forward.... Anyway, scenario is I need to log onto a second machine (remote server) from main workstation. Once logged in I need to run a batch... (2 Replies)
Discussion started by: Hopper_no1
2 Replies

5. Shell Programming and Scripting

executing command in a remote machine through ssh - shell script

Hi All, i have two machines like x and y . my requirement is i should connect to machine Y from x through ssh connection . and do some operation such as copy and move and delete files in Y machine . i tried with this code but it is doing in machine x only . and i need to exit from Y when... (1 Reply)
Discussion started by: rateeshkumar
1 Replies

6. Linux

Create VNC Session on remote machine on which ssh access is denied

Hi Folks, I want to create VNC session on the Remote RHEL machine on which ssh access is denied. Is there any way so that I can create VNC session without ssh access. Let me know all possible ways! (1 Reply)
Discussion started by: gydave
1 Replies

7. Shell Programming and Scripting

Cannot create variables via ssh on remote machine

Hello to all Background info: Local machine : Linux, /bin/bash Remote machine (for the user used for ssh) : SunOs, /bin/ksh (so we have different OS, different Shells) My problem : From the local host i execute $ var=bla $ result=$(ssh -q user@remote-machine " > echo \"this is... (12 Replies)
Discussion started by: black_fender
12 Replies

8. UNIX for Dummies Questions & Answers

how to use ssh to run shell script on a remote machine?

how to use ssh to run shell script on a remote machine? ssh user@remote sh ./script.unx i ran the above command ./script.unx HAS NOHUP COMMAND IN ITS BODY, I AM GETTING ERROR AS NOHUP NOT FOUND... i tried to run that script from remote server, its working fine do ineed to set... (6 Replies)
Discussion started by: only4satish
6 Replies

9. Red Hat

iptables applied in local machine, can't ssh remote machine after chain changed to DROP

I want to SSH to 192.168.1.15 Server from my machine, my ip was 192.168.1.99 Source Destination was UP, with IP 192.168.1.15. This is LAN Network there are 30 Machine's Connected to the network and working fine, I'm Playing around the local machine's because I need to apply the same rules in... (2 Replies)
Discussion started by: babinlonston
2 Replies

10. Linux

Executing a script in remote machine through ssh

How to execute a script in remote machine through ssh I have a script test.sh which does some backup activity in remote machine. Wanted to keep backup also in remote machine. ssh -l username <remote machine> "commands to be exceuted as ; separted" but how to put the script in the place of... (5 Replies)
Discussion started by: sanvel
5 Replies
ENUM 
IEEE80211_STA_I(9) Internals ENUM IEEE80211_STA_I(9) NAME
enum_ieee80211_sta_info_flags - Stations flags SYNOPSIS
enum ieee80211_sta_info_flags { WLAN_STA_AUTH, WLAN_STA_ASSOC, WLAN_STA_PS_STA, WLAN_STA_AUTHORIZED, WLAN_STA_SHORT_PREAMBLE, WLAN_STA_WME, WLAN_STA_WDS, WLAN_STA_CLEAR_PS_FILT, WLAN_STA_MFP, WLAN_STA_BLOCK_BA, WLAN_STA_PS_DRIVER, WLAN_STA_PSPOLL, WLAN_STA_TDLS_PEER, WLAN_STA_TDLS_PEER_AUTH, WLAN_STA_UAPSD, WLAN_STA_SP, WLAN_STA_4ADDR_EVENT, WLAN_STA_INSERTED, WLAN_STA_RATE_CONTROL, WLAN_STA_TOFFSET_KNOWN, WLAN_STA_MPSP_OWNER, WLAN_STA_MPSP_RECIPIENT }; CONSTANTS
WLAN_STA_AUTH Station is authenticated. WLAN_STA_ASSOC Station is associated. WLAN_STA_PS_STA Station is in power-save mode WLAN_STA_AUTHORIZED Station is authorized to send/receive traffic. This bit is always checked so needs to be enabled for all stations when virtual port control is not in use. WLAN_STA_SHORT_PREAMBLE Station is capable of receiving short-preamble frames. WLAN_STA_WME Station is a QoS-STA. WLAN_STA_WDS Station is one of our WDS peers. WLAN_STA_CLEAR_PS_FILT Clear PS filter in hardware (using the IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next frame to this station is transmitted. WLAN_STA_MFP Management frame protection is used with this STA. WLAN_STA_BLOCK_BA Used to deny ADDBA requests (both TX and RX) during suspend/resume and station removal. WLAN_STA_PS_DRIVER driver requires keeping this station in power-save mode logically to flush frames that might still be in the queues WLAN_STA_PSPOLL Station sent PS-poll while driver was keeping station in power-save mode, reply when the driver unblocks. WLAN_STA_TDLS_PEER Station is a TDLS peer. WLAN_STA_TDLS_PEER_AUTH This TDLS peer is authorized to send direct packets. This means the link is enabled. WLAN_STA_UAPSD Station requested unscheduled SP while driver was keeping station in power-save mode, reply when the driver unblocks the station. WLAN_STA_SP Station is in a service period, so don't try to reply to other uAPSD trigger frames or PS-Poll. WLAN_STA_4ADDR_EVENT 4-addr event was already sent for this frame. WLAN_STA_INSERTED This station is inserted into the hash table. WLAN_STA_RATE_CONTROL rate control was initialized for this station. WLAN_STA_TOFFSET_KNOWN toffset calculated for this station is valid. WLAN_STA_MPSP_OWNER local STA is owner of a mesh Peer Service Period. WLAN_STA_MPSP_RECIPIENT local STA is recipient of a MPSP. DESCRIPTION
These flags are used with struct sta_info's flags member, but only indirectly with set_sta_flag and friends. AUTHOR
Johannes Berg <johannes@sipsolutions.net> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 ENUM IEEE80211_STA_I(9)
All times are GMT -4. The time now is 02:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy