Results 1 to 3 of 3

Thread: ssh nohup connection

  1. #1
    Guest

    Default ssh nohup connection

    Good morning all !

    Can any one point out me towards this small issue. I would like to use ssh connection to connect remote server and run command. Once done i would like to quit ssh but keep running command in background. someone told me to use nohup but i' m unable to use it. Please give me syntax or usage of same. Thanks a lot for reading

  2. #2
    Contributors
    Join Date
    Jun 2005
    Location
    London, UK
    Posts
    208
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    10

    Default

    You can use ssh

    ssh user@server

    Once logged in try nohup as follows
    Code:
    # nohup command &
    # exit
    OR

    Code:
    # nohup script.sh &
    # exit
    See http://www.cyberciti.biz/nixcraft/vi...r-you-exit.php

  3. #3
    Junior Member
    Join Date
    Aug 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Remote command via ssh with nohup

    Hello

    I am having a server, which normaly doesn't use X. However i am using Xvfb when i connect to it via SSH, and seting tunneling to vnc port. Server script looks is

    Code:
    #!/bin/bash
    
    xset -display :25 -q &> /dev/null
    
    if [ $? != 0 ]; then
      echo "Starting X'es"
      nohup startx startkde -- Xvfb :25 -screen 0 1270x740x24 &> /dev/null &
    else
      echo "X'es started"
    fi
    
    x11vnc -display :25
    When I log in normally via ssh, and then run a script, the Xvfb session lasts as long as i don't log out of kde - which means that i can freely create and close VNC connections without killing X sever.
    However when i use ssh remote command to automate process (simply a saved putty session with set up host address, tunneling and script name) then as soon as i close VNC connection, and script ends, the Xvfb also gets killed. It's happening despite using nohup. Is this behavior normal? How to make it work?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ISP connection
    By althea008 in forum Computer Networking and Internet/broadband
    Replies: 0
    Last Post: 20th March 2008, 05:41 AM
  2. ssh connection on WAN
    By satimis in forum Networking, Firewalls and Security
    Replies: 0
    Last Post: 21st February 2008, 01:28 PM
  3. squid ftp connection
    By pansarevai in forum Linux software
    Replies: 4
    Last Post: 18th February 2008, 05:36 PM
  4. PPPoE Connection on OFF hour
    By surmandal in forum Computer Networking and Internet/broadband
    Replies: 3
    Last Post: 16th January 2008, 01:01 PM
  5. how to do nohup on an sh file
    By in forum Linux software
    Replies: 1
    Last Post: 30th January 2006, 04:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •