0
votes
0answers
62 views

SSH without invoking shell

I've managed to mess up some shared libraries on my system, and now my shell cannot be run, thus locking me out of the system. Both ssh, sftp, and scp, as configured on the remote system, seem to rely ...
0
votes
1answer
32 views

chattr: undefined symbol: set_com_err_gettext

I've moved my CentOS 6.5 installation to a new server and I'm unable to use chattr on my new server: chattr: symbol lookup error: chattr: undefined symbol: set_com_err_gettext How to resolve this ? ...
0
votes
1answer
46 views

How to prevent syslog message popping in a ssh session without affect other sessions?

i have a machine(RHEL 5.2) which receives syslog message from remote machines. And now it keeps popping message from remote machine in a ssh shell, which is annoying when i want to do something on it. ...
0
votes
0answers
41 views

Distributing Master node ssh key

For the master node to passwordless-ly ssh into the slaves, the master needs to distribute its ssh key to the slaves. Copying key using ssh-copy-id asks for the user password. If there are hundreds of ...
0
votes
7answers
162 views

better way to loop through a list of servers

I regularly do things where I loop through a list of servers to take some action. For example: for s in `cat servers.txt` ; do echo; echo $s ssh $s 'do something' done I'm wondering (from a ...
0
votes
1answer
35 views

Bash function hangs while command run perfectly without function

Following function hangs : ssh() { local RESULTS; RESULTS=$(ssh $USERNAME@$SERVER $SSH_COMMAND1); echo $RESULTS; } ssh; while if i run following commands they work fine : ...
0
votes
2answers
55 views

Access local console via SSH

I am searching for a way to interact with a local console via SSH - just as you would do with an directly connected keyboard. In my particular case I got a debian server (console only, no X system) ...
2
votes
2answers
53 views

How to keep script from swallowing all of stdin?

I have a script that reads from a pipe in a loop and runs an expect script and a normal shell script in the loop. Both scripts run ssh to another server to grab a piece of data. For example: cat ...
0
votes
0answers
938 views

rsync: getcwd(): No such file or directory (2)

I want to sync Server1 and Server2's logs to LogServer. For Server1: rsync -avz -e 'ssh -p 2188' user@server1:/usr/local/servers/logs/* /usr/local/logs/ This one works, but for Server2: rsync ...
2
votes
2answers
43 views

ssh dissable login, but allow copy-id

I have a user that's only used for a proxy, so no one can login. #passwd file entry proxyuser:x:996:99::/home/proxyuser:/bin/false but, I'd like to enable ssh-copy-id to that user How do I do ...
1
vote
2answers
525 views

How to view and kill PHP processes?

I'm very new to using SSH and am having trouble finding a way to view and kill PHP processes that are running. When I say "PHP processes," I mean PHP files that were started through the browser, but ...
2
votes
2answers
58 views

Will locally mounting root filesystems of all remote servers being managed eliminate need to share dotfiles?

I've got about 10 remote servers being managed, through SSH, and I typically just SSH into each of them for remote management tasks. This requires me to have duplicated many of my dotfiles (like ...
0
votes
1answer
74 views

Close putty connection from CentOS 6 shell script

as title says I have a centOS 6 machine which uses an dracut, initramfs preboot ssh. I want to create a shell script that at the end of it's execution it closes the console and ssh connection. How can ...
3
votes
3answers
782 views

Log commands executed over ssh

I would like to log all commands executed over SSH. Say, ssh something@server.com COMMAND I want to log "COMMAND" on server.com I did search extensively but could not find anything. There is ...
17
votes
3answers
785 views

How do I ssh on slow/flaky connections?

I am dealing with a really slow shell connection. It is in the cloud and I am very far from the server. My connection also breaks sometimes as it is over the internet and I may also be using shared ...
0
votes
2answers
103 views

How to regain an interactive shell that was disconnected via SSH?

Scenario: I am on windows, using putty to login to a root shell. It is currently running an interactive process which prompts for input to continue. Typical interactive process, its probably waiting ...
2
votes
2answers
171 views

executing .bash_profile alias via SSH

I would like to remotely execute a .bash_profile alias, but I cannot find the proper command. I tried: ssh user@host "bash -ic myalias" but it doesn't work I get: bash: cannot set terminal process ...
1
vote
3answers
627 views

Running ssh-agent from a shell script

I'm trying to create a shell script that, among other things, starts up ssh-agent and adds a private key to the agent. Example: #!/bin/bash # ... ssh-agent $SHELL ssh-add /path/to/key # ... The ...
1
vote
2answers
55 views

enabling shell access for cyrus user

My current cyrus user in /etc/passwd looks like this: cyrus:x:76:12:Cyrus IMAP Server:/var/lib/imap:/sbin/nologin I want to be able to give it shell access but restrict it to /var/lib/imap and ...
1
vote
1answer
129 views

Shell script error on filename with spaces

I have a bash script that search for every static file located under my server root and stores a gzipped version next to each file. I got it from ...
3
votes
1answer
59 views

Is it possible to attach a shell to an existing ssh tunnel?

I have a few SSH tunnels setup for auto-connection/re-connection with Shimo. Is there a way of attaching shell access to those existing tunnels and how if so? Or will I have to establish a new ssh ...
2
votes
2answers
375 views

Is there a shell to change password when connecting over SSH?

This is a pretty odd question, but I'd like my users to be able to change their passwords for my FTPS server, which is using local accounts. Currently all these users have /bin/false set as shell, but ...
1
vote
3answers
597 views

How can I suppress the “…this does not map back…” message when using SSH?

I am writing a script that attaches to several of our machines via SSH to check some usage stats. Each time I do: ssh -i ~/.ssh/ourkeyfile.pem user@host I get the typical message: Address ...
0
votes
2answers
330 views

SSH direct stdin and stout to and from postgres client

my local can connect to remote , but it cannot connect to dbserver. remote can connect to dbserver (with psql). I want to run sql scripts from my local against the db. I am looking to a way to open ...
1
vote
1answer
272 views

w command not showing users when not root

I have multiple users logged on my server (ubuntu 12.10), with ssh. None of them has root privileges. If I log in with my admin account and type w the resulting output is: 17:21:05 up 10 days, ...
-3
votes
2answers
243 views

Simplest way to jail users for git [closed]

I'd like to create a couple user accounts on my server such that the users can check out a specific git repository. Ideally, the user would not be able to gain access to a shell or copy any files ...
1
vote
2answers
157 views

Making a user account dedicated to a single script in centos

I am trying to make a SSH login for someone on my box. But when they login I want it to auto load a perl script and for them ONLY to be aloud to see / use that perl script. I only know how to use ...
2
votes
4answers
553 views

SSH connection closes as shell fails to load

I have FreeBSd running with OpenSSH. I set up everything and the connection via SSH worked perfectly. Then I decided to get rid of some not used ports and I obviously uninstalled one that was used by ...
3
votes
2answers
1k views

Script to run chown on all folders and setting the owner as the folder name minus the trailing /

Some numpty ran chown -R username. in the /home folder on our webserver thinking he was in the desired folder. Needless to say the server is throwing a lot of wobbelys. We have over 200 websites and ...
7
votes
3answers
410 views

Custom Openssh Shell

The environment is Ubuntu Server 12.04 I would like to create a user on a server that is only able to ssh into a shell that runs tail -f on a log file and closes the session once the program ends ...
5
votes
2answers
241 views

Confusion over terminology SSH, Shell, Terminal, Command Prompt and Telnet

I don't usually use SSH if I can get away with it, but if I have to I do of course, and I've seemingly done this for years while still managing to remain slightly confused about these different terms ...
3
votes
3answers
3k views

pass a password to sudo su

I wanted to sudo to different user after ssh'ing into remote server, for this i tried the following: cat remote-test.sh ssh -t -t abcuser@test-server.net 'bash -s' << EOF /tmp/test.sh EOF ...
1
vote
1answer
33 views

Mongo is not account specific

I have mongo running on my system however I can access all my databases/collections from other peoples accounts. Can I secure specific collections? How do I block access to my collections but not cut ...
0
votes
3answers
94 views

Backing up server site as an automated process?

I am the web administrator for a small company. We host our website on our own server. The site runs on PHP and MySQL. I access the server via SSH. I am not very familiar with UNIX/LINUX commands, ...
0
votes
1answer
164 views

How can I tell what is causing a delay in ssh connection startup? [duplicate]

Possible Duplicate: ssh delay when connecting This is a toss up between superuser and serverfault but I figure it's more a serverfaulty question. I do development on a solaris box... ...
1
vote
4answers
141 views

Stripping “extra spaces” in du -sk for bash script?

I am trying to use du -sk to get the size of two folders dirsize_temp=`du -sk /folder/path/here` and then an if statement to compare the sizes. The only issue is that when you run the command, it ...
0
votes
1answer
299 views

Home folder only SFTP connection has limited access

I have configured sftp access for user using this guide: Linux shell to restrict sftp users to their home directories? I have problem though. I have taken all steps. I have chown'ed root:user the ...
3
votes
3answers
270 views

Multiple SSH sessions in a single command

I'm trying to copy a database from one server to another. I tried using the following command and it's getting tied up on entering the ssh passwords. If I put in one server's password, it complains ...
2
votes
1answer
361 views

Answering interactive questions in bash script

I've got a device that supports strange "ssh". It doesn't support key auth an my problem is I don't know how to feed it username and password (-l or user@host are not working). It asks for login and ...
0
votes
1answer
398 views

SSH connection gives no prompt, unresponsive

I'm ssh'ing from my OSX laptop to an OSX server. It worked a couple of days ago. Now, when I try and connect, no text is output. My session (with -v option) looks like: ~ $ ssh myserver ... ...
0
votes
2answers
128 views

Creating a backup script involving screens and java?

Hi guys I use centOS 64bit 5.7 and I need to create a backup script What I want it to do: screen -r example command into java pause for x amount of seconds exit screen zip/rar a folder which and ...
0
votes
2answers
759 views

How to secure svn+ssh checkout users?

All our SVN repositories are hosted on a dedicated machine on which all the developers have access. Every now and then we need to checkout a repository on a machine we don't own or operate ourselves. ...
0
votes
1answer
65 views

Limitied Shell for users - Ubuntu

At my old job we had a Ubuntu 8.04 server that we SSH into. The shell was very limited (no bash history, can not tab predict commands, etc). Is there a config file to do things like that?
2
votes
2answers
1k views

ssh initial prompt hangs for 10 minutes but console login and initial prompt is very responsive - why?

I have been running an ESXi 4.0 server for months with a couple of WinServer2003 and several Ubuntu Server 10.4 VMs. The performance has been impressive on 6GB i7 Asus P6T hardware. Suddenly, a week ...
0
votes
1answer
503 views

Run Python program when user logs in using SSH

I want to have a command line program that I made in Python automatically run when a certain user logs in on my server using SSH. But the user must not be able to escape the program or run any other ...
4
votes
4answers
258 views

SSH - Run a command, then give me a shell

This question reminded me of one of my own. I want to create an alias that will ssh to a machine, runs a command (in this case, cd to a provided path) and then gives me a shell. I've run a hundred ...
0
votes
1answer
638 views

How to write a shell script for OS X to log in to a remote server via SSH and execute commands

This seems simple enough... I'm trying to write a script that I can just double click on in OS X. The script is to login via SSH to a remote server, run a git commit and exit. When I copy/paste my ...
0
votes
2answers
618 views

Rsync Push files from linux to windoes. ssh issue - connection refused

For some reason I want to run a script to move files from Linux machine to Windows. I have installed cwRsync on my windows machine and able to connect to linux machine. When i execute following ...
1
vote
3answers
226 views

Is there a way to push shell config information when SSHing to a host?

I've got a bunch of good stuff in my bash config. Normally when I get a new account, I pull this down from my GitHub repo so that I have all the aliases and features I'm used to. There are some ...
5
votes
4answers
954 views

How to check file permissions via SSH

To start out I am very new to this so please forgive me if this is extremely basic or I sound overly uninformed. I would like to check all the files in a specific directory on my VPS to ensure that ...