---
title: "退出ssh，进程被kill"
author: "bee1314"
date: "2014-03-04T10:41:13Z"
tags: []
categories: ["操作系统"]
slug: "ssh-kill"
draft: false
lastmod: "2014-03-04T10:41:13Z"
id: 2025271
url: "https://bee1314.iteye.com/blog/2025271"
---

mac下ssh命令直接登录remote机器，启动daemon进程如：coffee app.coffee，在退出(无论是exit还是直接关闭终端)ssh后，进程会被kill掉。发现了nohup命令，解决这个问题。直接用nohup coffee app.coffee & 然后生成一个nohup.out文件，这样就可以放心的退出ssh了。详细使用请参见，man nohup。