using: ssh host command


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users using: ssh host command
# 1  
Old 02-27-2006
using: ssh host command

I will remote a connection to a Unix server and launch a command on this server. This commnand requires me to set a view in Clearcase to see the vob element. How do I set a view an run a command with ssh with the syntax: ssh host command?
# 2  
Old 02-27-2006
I cannot help you with the Clearcase thing, but to execute a remote command using ssh you can use the following syntax:
Code:
ssh -l <username> <hostname> <command>

# 3  
Old 02-27-2006
You can use this sample command and see if it works.

ssh hostname "ls -l"

where hostname is server name and anything inside the double quotes is the command.
# 4  
Old 03-02-2006
I also tried to run the command remotely but it does not work. What other condition should be met to run the command remotely like

ssh -l username remoteserver command

thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute command on remote host via ssh

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)
Discussion started by: urello
3 Replies

2. AIX

Ssh to the same host is not working

I am trying to ssh the same host where I am logged in.It's asking for the password. Please assist me with the troubleshooting steps for this. Best regards, Vishal (4 Replies)
Discussion started by: Vishal_dba
4 Replies

3. Shell Programming and Scripting

How can i get the logged in host machine ip in a ssh connection?

Hi All, I have a basic question. In my system i maintained multiple unix server, and only one server has public ip, and all the servers are behind load balancing BIG ip server. To access any server, user need to access server with public IP then from there they can establish ssh connection to... (2 Replies)
Discussion started by: dilipsn
2 Replies

4. UNIX for Dummies Questions & Answers

UNIX script to use ssh to host

I am doing an old-school command to get an inventory to many host using ssh thru Solaris machine. Please help me find a way thru script to get this automized. This will make me lazy but will surely benefit out of it. thanks in advance. Process I am doing: Host IPs (examples): 10.210.1.2... (1 Reply)
Discussion started by: TripleHar
1 Replies

5. IP Networking

ping can not recognize host but host command can

Hi, I have a weird problem. when ever I do ping command like for example ping unix.comI get the following message: # ping unix.com ping: unknown host unix.com but when I use host the computer is able to know the host. # host unix.com unix.com has address 81.17.242.186 unix.com mail is... (2 Replies)
Discussion started by: programAngel
2 Replies

6. UNIX for Advanced & Expert Users

Help! How to find the local host after few ssh hops to remote host???

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)
Discussion started by: gomes1333
3 Replies

7. Solaris

unable to ssh to remote host

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)
Discussion started by: uuontario
7 Replies

8. Shell Programming and Scripting

ssh to remote host and execute command

Hi, could anyone please tell me how to ssh to remote host foo and execute command on it and print the result on local host? Thanks, Paresh (1 Reply)
Discussion started by: masaniparesh
1 Replies

9. Shell Programming and Scripting

ssh to a remote host

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)
Discussion started by: Aditya.Gurgaon
1 Replies

10. UNIX for Dummies Questions & Answers

host based ssh through a web browser

I'm looking for some sort of provider that I can connect to through a browser and subsequently open an ssh connection to another host. client based applet type solutions are blocked by firewall (2 Replies)
Discussion started by: dirtybrown
2 Replies
Login or Register to Ask a Question