Tagged Questions
0
votes
1answer
78 views
Counting files on a remote server with ssh and an expect script
Below is my script to take count for files which are present in remote server.
But it is not working. Please help me.
#!/usr/bin/expect
spawn ssh [email protected]
expect "123"
send "123"
interact
...
1
vote
1answer
63 views
Why ssh -nq -t can't see my environment variable?
I am executing a command on remote machine with -t flag ( to prevent the command from 'blocking' ) the prompt (somehow it works that way). So I am using ssh -nq -t root@ip but with this, the script ...
0
votes
2answers
95 views
Automated ssh-keygen without passphrase, how?
I would like to make an automated script that calls ssh-keygen and creates some pub/private keypairs that I will use later on. In principle everything works fine with....
ssh-keygen -b 2048 -t rsa -f ...
2
votes
1answer
187 views
permission denied executing script over ssh
When a web page is loaded on server A i want it to run a script on server B. I can do this with a series of commands from server A by logging into server B and executing the script, but it needs to be ...
1
vote
1answer
484 views
Script to get file from SFTP and run it
We have 5 servers running our code: A, B , C, D and E.
From a local machine, we sftp the file to A. Then
ssh id@A
su - applicationname
sftp id@A
get <file>
bye
tar -xzf <file>
logout
...
3
votes
2answers
867 views
Execute remote script with local parameter value
How can I automatize this task?
1) You are at A.
2) You ssh into B.
3) You run a script at B, that needs a parameter known at A.
First, I thought perhaps I could send the value when I opened the ...
0
votes
2answers
172 views
Autentification on SSH connection in OneLine [duplicate]
Possible Duplicate:
Shell Script for logging into a ssh server
I need to connect via SSH to a remote server, however I must do this with out interactive mode and with out use Public keys ...
3
votes
4answers
777 views
passing passwords to a script
I want to scp a file to a remote host, and from there, run a command on the file, and exit the remote session. If I write a usual script, call scp and then ssh, I am prompted to enter two passwords. ...
7
votes
6answers
10k views
Execute remote commands, completely detaching from the ssh connection
I have 2 computers, localpc and remoteserver.
I need localpc to execute some commands on remoteserver. One of the things it needs to do is start a backup script that runs for a number of hours. I ...
2
votes
3answers
648 views
Keep running a script via ssh
ssh can use to run remote commands.
ssh [email protected] 'long-script.sh'
I run a long script that will take a lot of time, but I want to close my computer and keep running the script in the remote ...
0
votes
2answers
202 views
Creating SSH Terminal Wrapper
I'm new to scripting, but somewhat familiar with Linux. I am actually using this on a Fedora16 build, with Gnome3 and gnome-terminal... fyi.
I flip through all sorts of ssh terminals all day long ...
0
votes
3answers
258 views
wrapper command for sshd_config?
Is there a command to set settings in sshd_config, instead of manually editing the file? I would prefer it to do this way, because it's easier to automate. Otherwise I'd have to grep config with my ...
5
votes
4answers
570 views
Automatically run commands over SSH on many servers
There is a list of IP addresses in a .txt file, ex.:
1.1.1.1
2.2.2.2
3.3.3.3
Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is ...
12
votes
3answers
3k views
Answer yes in a bash script
I'm trying to do a git clone trough a bash script, but the first time that I run the script and the server is not known yet the script fails. I have something like this:
yes | git clone ...
3
votes
1answer
296 views
Make a failed SSH forward a fatal error
I have a script which connects to a remote host to replicate some files via SSH. I must connect to an rsync daemon listening on port 873. To accomplish this I have a ssh configuration like this.
...