I am using KSH and I need to check whether the remote host has been configured with ssh public key. Is there any way we can check inside a script? (6 Replies)
Hi,
Not sure if this is possible, I have a server (SERVER1) that is currently set up as a remote SSH host. My client SSH host (SERVER2) is connecting to SERVER1 to scp a file with no password.
I now have a need to set up a third server (SERVER3) as a remote SSH host and I need SERVER1 as a... (4 Replies)
How can i access environment variables on remote host using ssh
example:
# Remote server
$ echo $MAIL
/var/spool/mail/gacf
$
# Local server
$ ssh gacf@server1 'echo $MAIL'
/var/mail/gacf
$
Expected to find:
$ ssh gacf@server1 'echo $MAIL'
/var/spool/mail/gacf
$ (3 Replies)
i want a script with expect or perl or shell which will do ssh to remote host...it will take commandline argument and run the script in remote host.......
i.e that will be like ./ssh.exp remoteip username passwd /tmp.kk.sh
can someone help me on this? (1 Reply)
server is ok, I can login on console. however, when I use SSH teachia, there is no repsond.
i have check ps-ef | grep ssh, it shows ok. restart ssh too. still not working.
Anything else I need to check?
# ps -ef | grep ssh
root 24706 1 0 Jun 12 ? 0:00... (7 Replies)
Hi all
I wrote a script to execute a script on several remote hosts, but somehow during the execution of the local script, ssh can't come back from the remote host, so that causes my local script hanging... I use the below command to do the job in the local script, any idea?
ssh... (12 Replies)
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
How should i make the following code working
#!/bin/bash
INPUTFILE="test.txt"
while read STRING; do
IP=`host -t A $STRING | awk '{print $NF}'`
HOSTNAME=`ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no $IP "hostname"`
echo $HOSTNAME > out.txt
done < $INPUTFILE
At this moment while... (3 Replies)
I am trying to connect to a remote host C from my node host A.
HostA <====> HostB <====> HostC
A tunnel has already been formed using SOCKS5 between HostA and HostC.
Now I want to SSH from A to C. The SOCKS5 IP us 142.133.132.161 and port 1082.
The command I am using is :
ssh -L... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
LEARN ABOUT DEBIAN
knife-ssh
KNIFE-SSH(1) Chef Manual KNIFE-SSH(1)NAME
knife-ssh - Run a command or interactive session on multiple remote hosts
SYNOPSIS
knife ssh QUERY COMMAND (options)
-a, --attribute ATTR
The attribute to use for opening the connection - default is fqdn
-C, --concurrency NUM
The number of concurrent connections
-m, --manual-list
QUERY is a space separated list of servers
-P, --ssh-password PASSWORD
The ssh password
-x, --ssh-user USERNAME
The ssh username
-i, --identity-file IDENTITY_FILE
The SSH identity file used for authentication
-p, --ssh-port PORT
The ssh port
--[no-]host-key-verify
Verify host key, enabled by default.
DESCRIPTION
The ssh sub-command opens an ssh session to each of the nodes in the search results of the QUERY. This sub-command requires that the
net-ssh-multi and highline Ruby libraries are installed. On Debian systems, these are the libnet-ssh-multi-ruby and libhighline-ruby pack-
ages. They can also be installed as RubyGems (net-ssh-multi and highline, respectively).
TERMINAL MULTIPLEXING AND TERMINAL TAB SUPPORT
knife ssh integrates with several terminal multiplexer programs to provide a more convenient means of managing multiple ssh sessions. When
the COMMAND option matches one of these, knife ssh will create multiple interactive ssh sessions running locally in the terminal multi-
plexer instead of invoking the command on the remote host.
The available multiplexers are:
interactive
A built-in multiplexer. interactive supports running commands on a subset of the connected hosts in parallel
screen(1)
Runs ssh interactively inside screen. ~/.screenrc will be sourced if it exists.
tmux(1)
Runs ssh interactively inside tmux.
macterm (Mac OS X only)
Opens a Terminal.app window and creates a tab for each ssh session. You must install the rb-appscript gem before you can use this
option.
SEE ALSO knife-search(1)AUTHOR
Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.
DOCUMENTATION
This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this docu-
ment under the terms of the Apache 2.0 License.
CHEF
Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home
Chef 10.12.0 June 2012 KNIFE-SSH(1)