Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Ubuntu 

SSH - Problem with Command Line

Hey , got a little dumbass problem.. If I start my perl script via SSH , I can't do anything else without restart Putty and connect again to the Server. I read anywhere that I can close the perl script with a key like strg+ F10 or something , but at the moment I can't type any other command than the first .
Feel free to ask me any question about RAT's. I am there to answer them all. My skype is: kim.kertani
nohup perl scipt.pl &

should put the script in background and keep it running after the SSH session is closed.
Maybe perl script didnt end so you cant do anything.
Try to open new ssh from putty - one more, so you can connect and killall to close it for example.
Maybe it will be helpful
Do commands like ctrl+c or anything work? Try ctrl+z and see if that does anything or not.

Can you open a new instance of putty (right click, new session)?
….


deez nutz
Install screen (Not sure on your distro)

Once installed run
Code
$ screen

Run your script
Code
$ ./script.pl

then to exit Press Ctrl + a then d

this will detach screen from the session, returning you to your original prompt. To reattach run
Code
$ screen -r

Knowledge is power and the only source of knowledge is experience.

ctrl + c should cancel any operation.

If you want to keep a program running after closing putty use screen tutorial is above my post
(Oct 27, 2014 03:39 PM)GamingManiac Wrote:  Install screen (Not sure on your distro)

Once installed run
Code
$ screen

Run your script
Code
$ ./script.pl

then to exit Press Ctrl + a then d

this will detach screen from the session, returning you to your original prompt. To reattach run
Code
$ screen -r

Using screen for this purpose isn't the best way to do it. You can use pre installed tools such as, nohup, fg, bg instead.
(Oct 27, 2014 04:10 PM)Loki123 Wrote:  Using screen for this purpose isn't the best way to do it. You can use pre installed tools such as, nohup, fg, bg instead.

You are probably correct - I forgot about nohup

Knowledge is power and the only source of knowledge is experience.



Possibly Related Threads...
Thread / Author Replies Views Last Post
by ReplaceNov 10, 2025 09:50 PM 4 234 Nov 10, 2025 09:50 PM
Last Post: Replace
by EtheriJan 16, 2025 10:22 AM 5 414 Jan 16, 2025 10:22 AM
Last Post: Etheri
by Ki11MachJan 4, 2019 07:12 PM 2 127 Jan 4, 2019 07:12 PM
Last Post: Ki11Mach