proper way to sudo over ssh

I have a script which runs another script via SSH on a remote server using sudo. However, when I type the password, it shows up on the terminal. (Otherwise it works fine) ssh user@server “sudo script” What’s the proper way to do this so I can type the password for sudo over SSH without the … Read more

How to scp in Python?

What’s the most pythonic way to scp a file in Python? The only route I’m aware of is os.system(‘scp “%s” “%s:%s”‘ % (localfile, remotehost, remotefile) ) which is a hack, and which doesn’t work outside Linux-like systems, and which needs help from the Pexpect module to avoid password prompts unless you already have passwordless SSH … Read more

How do I force detach Screen from another SSH session?

I had Screen running inside an SSH session. Terminal froze. After restarting Terminal, that Screen session still thinks it’s attached. Maybe it is. Perhaps I don’t really know what that means. I’d like to attach to that Screen session from a fresh SSH login. I do not want to kill that Screen session as important … Read more

SSH library for Java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to … Read more