Difference between revisions of "User:Girts:Linux Notes"

From DiLab
Jump to: navigation, search
(How to run script over SSH and keep it running after SSH is closed)
(How to run script over SSH and keep it running after SSH is closed)
Line 18: Line 18:
* run <code> screen <your-script> </code>
* run <code> screen <your-script> </code>
* detach screen by pressing Ctrl+A Ctrl+D
* detach screen by pressing Ctrl+A Ctrl+D
* You can close the SSH session and the script will remain running
* you can close the SSH session and the script will remain running
* to return to screen session afterward, issue <code>screen -r</code>
* to return to screen session afterward, issue <code>screen -r</code>



Revision as of 12:45, 15 April 2009

How to mount SSH file system in Ubuntu

From this site.

To mount remote director /home/share from host example.com to local folder /mnt/share, using ssh user remuser and local user locuser:

sudo apt-get install sshfs
sudo mkdir /media/share
sudo chown locuser /media/share
# local user must belong to the fuse group
sudo adduser locuser fuse
sshfs remuser@example.com:/home/share /media/share

Enter ssh user password when asked.

How to run script over SSH and keep it running after SSH is closed

  • SSH into the host
  • run screen <your-script>
  • detach screen by pressing Ctrl+A Ctrl+D
  • you can close the SSH session and the script will remain running
  • to return to screen session afterward, issue screen -r

How to change timezone

sudo dpkg-reconfigure tzdata