SSH doesnt exit properly from command line


 
Thread Tools Search this Thread
Operating Systems Solaris SSH doesnt exit properly from command line
# 1  
Old 06-16-2005
SSH doesnt exit properly from command line

I ssh to another server and run a few commands - start a few processes that run on the server.

I then type exit - by my command line hangs.
I have heard that it is waiting until anything processes you are running complete, but these processes are going to run 24*7*365 so obviously I cant wait. Is there away around this without having to close my terminal?

I am running OpenSSH_3.8p1 on Solaris 8 and the server I ssh to is also running OpenSSH_3.8p1 on Solaris 8


Any ideas?
# 2  
Old 06-16-2005
Create a wrapper script on the remote server that starts your process and then exits.
# 3  
Old 06-16-2005
Quote:
Originally Posted by frustrated1
I ssh to another server and run a few commands - start a few processes that run on the server.

I then type exit - by my command line hangs.
I have heard that it is waiting until anything processes you are running complete, but these processes are going to run 24*7*365 so obviously I cant wait. Is there away around this without having to close my terminal?

I am running OpenSSH_3.8p1 on Solaris 8 and the server I ssh to is also running OpenSSH_3.8p1 on Solaris 8


Any ideas?
I tend to believe it an issue of communication between the client and server. I would tune the client to see if I can get around of it. Tom
# 4  
Old 06-16-2005
Try running your command like this:

nohup command < /dev/null &
# 5  
Old 06-16-2005
if that still hangs, try --- after you type in exit, press return and it looks like it's still hanging ... type in "#." (pound dot) ...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

While loop is causing ssh command to exit from script after first iteration.

I am trying to check multiple server's "uptime" in a loop over "ssh". When I execute multiple ssh commands with hard coded servernames script is executing fine. But when I pass server names using while loop, script is exiting after checking first server's status, why? # serverList... (8 Replies)
Discussion started by: kchinnam
8 Replies

2. Shell Programming and Scripting

while loop stops after first iteration - remote ssh exit command problem?

I have written the following script to update some Debian boxes. #!/bin/bash mxg_hosts_file="/etc/mxg/ssh-hosts" while read line ; do mxg_host="$(echo ${line} | awk -F":" '{print $1}')" mxg_port="$(echo ${line} | awk -F":" '{print $2}')" echo "Connecting and Upgrading... (3 Replies)
Discussion started by: jelloir
3 Replies

3. Homework & Coursework Questions

I need to make a script that has 4 command line arguments to function properly.

I have no idea what the following means. The teacher is too advanced for me to understand fully. We literally went from running a few commands over the last few months to starting shell scripting. I am not a programmer, I am more hardware oriented. I wish I knew what this question was asking... (3 Replies)
Discussion started by: Wookard
3 Replies

4. Shell Programming and Scripting

Delete all line breakes from File doesnt work

Hi, I have to delete all line breakes but it doenst work. $ sed -e 's/\\n//g' file.txt and the output contents still line breakes. What should I do? sincerely, Blackbox (3 Replies)
Discussion started by: Blackbox
3 Replies

5. Shell Programming and Scripting

Check file and if it doesnt exist , exit script

Hi, Another problem, here is my code #!/bin/sh dir='/opt/apps/script/CSV' datadir='/opt/apps/script/data' while : ; do ls -1rt $dir/*.csv > /dev/null 2>&1 if ;then cp $datadir/weekly.txt $dir/weekly.csv else exit 0 fi done (10 Replies)
Discussion started by: tententen
10 Replies

6. Shell Programming and Scripting

A script doesnt work properly when crontab

Hi, I have a script which does a tar and sends it to another server as backup. Script is as below # Locations to be backed up. Seperate by space BACKUP_LOCATIONS=/repos/subversion BACKUP_BASE_FOLDER=/bakpool BACKUP_FILE_NAME_ROOT=svn-backup START_TIME_DISP=`date` START_TIME=`date... (11 Replies)
Discussion started by: digitalrg
11 Replies

7. UNIX for Advanced & Expert Users

need to concatenate two lines if the line doesnt end with quotes

Hi I am getting a source file where the columns are seperated by comma and double Quotes Eg1 : "AAA","BBB","CCCC" in the same source file i am also getting few lines where my last columns double quotes are ending in its next line or the next next line Eg2: "AAA","BBB","CCC CC"... (9 Replies)
Discussion started by: laxmi131
9 Replies

8. UNIX for Dummies Questions & Answers

SSH with a --password command line???

Has anyone heard of an OpenSSH client being compiled with an additional command-line option for password input? I realize there are reasons to NOT do this, and I realize you can achieve the same type of thing with keys, but I am specifically looking to pass the username & password BOTH on the... (5 Replies)
Discussion started by: jjinno
5 Replies

9. UNIX for Dummies Questions & Answers

exit status of command in a pipe line

Hi, I am trying to test the exit status of the cleartool lsvtree statement below, but it doesn't seem to be working due to the tail pipe, which it is testing instead. Is there a way around this without adding a tonne of new code? cleartool lsvtree $testlocation/$exe_name | tail -15 ... (10 Replies)
Discussion started by: topcat8
10 Replies

10. Shell Programming and Scripting

How do I get ssh to run a command in one line?

How would I combine something like: localserver# ssh remoteserver remoteserver# find blah blah blah into a one liner that would ssh to the remote server and run the find command, so I could put it in a script to automatically go out and run things on remote servers with out needed user... (2 Replies)
Discussion started by: LordJezo
2 Replies
Login or Register to Ask a Question