2
votes
2answers
31 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 ...
0
votes
2answers
107 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
46 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
45 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
288 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
654 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
73 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
97 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 ...
0
votes
2answers
173 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
40 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
92 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
57 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
321 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 ...
0
votes
3answers
551 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
231 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
184 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
189 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
133 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
444 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
751 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 ...
6
votes
3answers
313 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
222 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
31 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
93 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
161 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
128 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
275 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
264 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
288 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
366 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
125 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
720 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
64 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
455 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
240 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
467 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
527 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
215 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 ...
4
votes
4answers
647 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 ...
3
votes
4answers
2k views

Can I disable interactive shell access while tunneling web traffic through SSH?

I am looking into implementing SSH tunneling as a cheap VPN solution for outside users to access Intranet-only facing web applications. I currently am using Ubuntu Server 10.04.1 64 bit with OpenSSH ...
0
votes
2answers
2k views

How to set up a SVN without SSH/Shell access?

I want to be able to set up a private SVN for my small team that we can share code over the SVN, however I need to enable SSH/Shell access. Is there a way without using SSH/Shell access. If this is ...
2
votes
2answers
175 views

Dealing with shell commands that throw away old output

There are a bunch of shell commands that throw away old output. A couple that I have seen are Nose and Hudson. What I mean is that when the program is run, it produces a lot of textual output in the ...
2
votes
5answers
418 views

One shell question with ssh

I find one shell command can send large data to target host: dd if=/dev/zero bs=4096 count=1048576 | ssh user@ip 'cat > /dev/null' I think i can use this to test network bandwidth, but it can ...
2
votes
2answers
448 views

What is the best Android phone for remote ssh administration/scripting? [closed]

I've got a Moto Droid that I use with connectbot for remote admin on Linux webservers. However, I'm wondering if there are any Android phones out there with better hard keyboards for use with ...
12
votes
3answers
9k views

Where's my tab completion and up-arrow behavior? (Ubuntu 10.04)

I'm new to Linux, trying Ubuntu 10.04, preconfigured by host. When I log in (SSH) using the preconfigured account, the shell prompt is: user@hostname:~$ The up arrow scrolls through the list of ...
1
vote
5answers
493 views

Ubuntu server: manually changed /etc/passwd shell for my user, now can't login

I attempted to change shell from bash to tcsh via editing /etc/passwd file directly. Yeah, dumb move. I guess I've learned my lesson. Now I can't SSH into the remote server. Any way to fix this? PS. ...
1
vote
1answer
319 views

SSH in with alternative shell

We have a shared account on our system, which has login shell tcsh. I prefer bash and would like to have it run bash when I ssh in from my personal account but leave tcsh for anyone else using the ...
8
votes
8answers
4k views

How to determine if I'm logged in via SSH?

I'm currently setting up a fairly complex bash configuration which shall be used on multiple machines. I try to find out if it is possible to determine whether I'm logged in via SSH or on a local ...