I have a problem how to keep my program run in ssh when the laptop(Mac) loses wifi-connection or network. I was running a python program remotely by ssh into a server, and before I run the code I made a new screen by entering 'screen'. And then I ran the program and pressed ctrl+A+D to detach the screen. Everything looked fine and the program continued to work when the laptop was closed( in a place with WIFI). However when I walked outside with my laptop for several minutes and I reopened the laptop it showed 'write fail: broken pipe' and the program stopped. I guess the problem happened because the laptop lost the network connection. Is there any way to fix this problem such that I could bring my laptop anywhere and keep my program run?
Related Questions in SSH
- Is there a way to prevent vscode from forwarding ssh agent to remote dev container?
- problem to push files on a repository git
- How to connect to ssh server with domain name
- GIT SKIP EMPTY DIRECTORIES
- Share files from the server without data or internet usage
- Is it possible for `sudo` to fail temporarily with the correct password? Hacking suspected
- How to add a second ssh public key to authorized_keys file in the server?
- Termux: Different scrolling behaviour after "screen"-command
- Remote debugging via SSH Tunnel
- Why can I not login to a new linux system (amazon linux 2023) from an old one (CentOS 6)
- Can't establish ssh connection to IP address but can to git
- Using Maven to feed minikube on a VM
- Connect ssh to cisco switch with ansible
- PowerShell Command via SSH
- How to automate an SSH login with a batch file?
Related Questions in SERVER
- Sending data from C++ server to React.js client
- Deploy Flutter and Laravel php mobile app on the host server
- Protect Server Actions with Next Auth in Next JS 14
- Cannot interact with netcat server over distance
- Facing fatal errors while running "yum update" command on CentOS 7/Cloudlinux 7
- Is there any way to set a printer as default according with Active Directory Policy Security Group and PC hostname?
- How to run GRPC and REST server on same port in Go?
- Share files from the server without data or internet usage
- Django Not Sending Tasks to Celery in Production
- Install Postfix Mail Server
- Is it viable proxying all my mobile apps requests, to some kind knowing that a request is coming from a secure source
- How does a server handle multiple requests, and how does is know where to send which response?
- Trying to launch batch file from powershell, and immediately closes
- Apache: How can I redirect to a subfolder with a URL param but serve required content via the main URL?
- Developing on a remote server an app symfony
Related Questions in GNU-SCREEN
- Is there a way to uniquely identify the current Windows Terminal viewport within a WSL2 Ubuntu bash environment?
- GNU-Screen Serial Connection Needs To Be In Foreground To Start Working
- The save and restore screen commands do not seem to work within GNU screen
- How can I specify the Hardware Status Line with a command parameter?
- How can I start GNU Screen with a specific escape character
- How to make GNU screen create new window on same path under running process (ex: top)
- What is causing my figures to be invisible when I switch to a detached screen
- How to have a python script restart itself in a screen session?
- Using GNU Screen to open GUI window on remote desktop
- Linux "screen" session script
- Using screen hardcopy -h as a terminal emulator for log files, resulting output sometimes contains NULL characters amongst others
- Emulate a taller terminal within GNOME Terminal and pan up and down
- How to cleanup all unused screens?
- How to get terminal text from gnu screen session?
- simple split gnu screen
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Open the
screenon the remote server after SSHing in so you have a persistent session there, not on your local box.If you did that, note that you'll still get disconnected if you loose connection but then SSHing in again and re-open the
screensession to get back to work.edit:
With using
screenyou get a permanent session that you can restore. This sessions will live where you start it. If you want to make sure that you keep running something on the remote server, then firstSSHand then start thescreenon the remote.If you loose connection, then only your
SSHconnection will be terminated and you'll be disconnected from yourscreensession but that won't stop. You canSSHin again and reconnect to thescreensession.Try this:
After re-connecting to the
screensession you should see the dates still going without any pause.