Tagged Questions
0
votes
1answer
169 views
how to use expect with bash
I Have created a shell script as given below.This script will login to a remote server as a normal user then switch to root user for creating a directory.The script is as given below.
ssh -t ...
0
votes
0answers
35 views
Can I store a password in a bash script? [duplicate]
Is there some way to store (for example hashed etc.) secured password in a script that will be used during connection to server?
Storing password and username as clear text in code for me is quite ...
1
vote
1answer
61 views
Disabling bash history index in terminal
When I SSH into somewhere, I see something line this in the terminal:
[504]%
Looking it up, looks like its my bash shell history. How can I disable this index display and show the current working ...
1
vote
3answers
328 views
How can I make ssh-copy-id use a port other than 22?
How can I make ssh-copy-id use a port other than 22?
I tried it with -p but I get:
ssh-copy-id -p XXX XXXX@XX.XX.XX.XX
Bad port 'umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ...
1
vote
2answers
699 views
How do I include a password with SSH command? (want to make shell script)
I'm trying to SSH to a server on startup with a .sh script, but that will require me to enter the password for the account on the server that I'm SSHing to. I did some RTFMing, and I see in "-o" that ...
0
votes
0answers
161 views
ssh into server to run command, but command runs locally? [closed]
I am doing this
#!/bin/bash
#
for i in `cat filer.list`
do
ssh user@$i "version"
done
However, the script keeps running "version" locally and not on the remote server.
The remote server is ...
4
votes
2answers
2k views
How do I set up an email alert when a ssh login is successful?
Does anyone have a bash script that will email or notify someone in the case of a successful login to a ssh server? I want to be notified if anyone logs into my personal box.
I'm using Ubuntu 12.04 ...
0
votes
1answer
647 views
How would you go about backing up a remote Ubuntu VPS via SSH?
So, as I said I have a VPS, Raspberry Pi and a plan, but I am in need of some advice, so here goes.
I have a VPS with prgmr.com which I ahve up and running nice and smoothly without any issues. I ...
1
vote
2answers
124 views
Screen with ssh to overcome disconnection
I have a script name.bash. I want to run it on the server serv@domaine with ssh but I'm afraid to run it directly and close my shell and stop execution.
I read that i can run my bash on the server ...
4
votes
1answer
127 views
How to stop SSH filesystem from discarding root permissions after every command?
i have a small bash script that mounts my sshfs...
problem is it ask for the server/host password for every mount...
i have four mounts and i have to enter it every time for 4 times and its ...
0
votes
1answer
2k views
ssh:connection timed out [closed]
I am trying the following command on ubuntu
ssh host@xx.xx.xxx.xxx
and I get the following error:
ssh: connect to host xx.xx.xxx.xxx port 22: Connection timed out
so, I tried the following:
...
2
votes
2answers
638 views
How to automatically run commands on SSH connection?
I have some Amazon EC2 instances that run Ubuntu 10.04.1 LTS.
Every time I connect to those instances I run a couple of simple commands, like a cd <repository>, a git status etc.
How can I add ...
1
vote
2answers
384 views
asked for sudo password, post login to bash shell
With 11.10 when any of my users with the bash shell login upon success they are asked to provide their sudo password e.g.
Last login: Fri Jan 20 19:13:36 2012 from x.x.x.x
[sudo] password for *user*:
...
1
vote
1answer
554 views
Want to write a simple SVN update bash script
I want to write a simple bash script that will update an SVN working copy in a given directory. The repository is accessed with the svn+ssh protocol. The basic process this needs to follow is:
...
1
vote
2answers
1k views
Copy file to same directory with appended filename Via SSH Bash Script
How would I copy a batch of files into the same directory with an appended filename via SSH Bash Script?
For example.
/path/files/file /path/files/file-20120105
The trick is for it to be a one liner ...
-3
votes
2answers
3k views
Paswordless Rsync Over SSH Without Key Authentication [Un-Safe]
I want to set up an RSync job that would connect through SSH.
I have my computer ( backup@myhost ) and the remote host ( test@remhost ) and I need to backup the folder ~/something with all it's ...
1
vote
1answer
689 views
How to change putty color scheme on linux user basis?
When I ssh into my server all but one of my users has the color scheme. The one that doesn't, well everything shows up as gray text. Is there a way I can change this color scheme?
Also, why would ...
8
votes
6answers
10k views
Can you set passwords in .ssh/config to allow automatic login?
I'm using ubuntu 11.10. I'm using ssh for connecting to many servers daily, so i put their parameters in .ssh/config file; like this :
Host Home
User netmoon
Port 22
HostName test.com
Is there a ...
1
vote
3answers
3k views
Can I create an SSH login script?
I have to log in to my school's Linux server for homework. I would like to be able to make a script or something for my desktop to save a bit of time (using Ubuntu desktop).
Currently I log in using ...
0
votes
1answer
133 views
What command runs when I SSH into a server?
When I SSH into a server, I see the MOTD then I am in BASH. What command is running that takes care of displaying the MOTD and then starts the shell?
0
votes
1answer
599 views
My SSH tunnels get interrupted because the host machine falls asleep. Bug or Feature?
My gnome-power preference is set to automatically sleep after 30 minutes of inactivity. Apparently it thinks that a ssh connection is not a valid reason to keep it alive. Is this a feature or a bug? I ...