1
vote
1answer
17 views

Background chained ssh tunnel dropped instantly

I'm trying to establish the following chained ssh tunnel: ssh -A -t gatewayuser@gatewayserver 'ssh -N -A -t -R 55520:127.0.0.1:55520 user@dbserver' & This is part of a shell script, I want the ...
0
votes
1answer
72 views

How do you run a command as another user on Linux?

I have access to a linux server where I can sudo to 'foo' like this without a password: sudo su - foo Once I am the 'foo' user I am able to run a script like this: /dir/foo_user_script.sh The ...
1
vote
0answers
48 views

Cron deamon written in shell

I'm looking for a script in bash or ksh, that would do ... more or less ... the same as crond. The situation is, that our system administrator suddenly denied the use of crontab to all regular users ...
0
votes
1answer
58 views

Log in using SSH without password

On my server, I've got openssh-server and a special account without password. I'm creating a shell script, that must be used without user input. For example $(ssh dummyUser@dummy.com) I need script ...
0
votes
1answer
100 views

SSH shell on a multicore supercomputer [closed]

I created a program on my 2 core laptop and I want to verify how my program performs when more than 2 cores are available for processing. Do anybody knows any free (or cheap) service where I can ...
1
vote
2answers
131 views

Shell script to show online users

I know it's an amateur question. I need to write a Bash shell script which count how many users are online at the moment on the SSH server. I need to ignore multiple logins and show the username and ...
3
votes
2answers
236 views

scp between two remote hosts from my local

I have two remote hostes. host1-> 10.3.0.1 host2-> 10.3.0.2 Both are installed with ssh and scp. In my scanario, ssh and scp listen to port 22 in host1 and in host2 it is port 6969. Now, using my ...
0
votes
1answer
641 views

SSH Tunnel for restricted user w/ PuTTY and no shell

so I have been using SSH tunnels to restrict access to internal sites or portions of public sites for a while now, and since only admins had SSH access at all I've been using standard non-root/sudo ...
0
votes
1answer
137 views

Specifying an alternate shell with rsync

I'm using rsync to sync up files between two computers. On one machine, my default shell is set to fish, which breaks rsync ("protocol version mismatch -- is your shell clean?"). Is there a way to ...
0
votes
2answers
148 views

Multiple SSH failing to run more than one command

When a use multiple SSH like below i am only able to run one command, if try to run more than one command its fails. This thing is failing: ssh -o UserKnownHostsFile=/dev/null -o ...
0
votes
2answers
509 views

SSH session hangs when trying to open a shell

Since this morning I cannot login normally on my server using SSH anymore. Typically, when typing this: ssh foo@bar.org The shell hangs and does not acquire shell. The last line of verbose with ...
1
vote
1answer
38 views

How to fix.. my watch --interval=60 isn't working properly

Here is the code I use in my CentOS 5 32bit. But after this I see only some of files are zipped and a lot of them isn't included in produced gzip file. nohup watch --interval=60 tar -zcvf ...
3
votes
2answers
179 views

Is setting a mail user's shell to /usr/bin/passwd in the /etc/passwd file a safe way to allow them to change their own password by simply ssh'ing?

I have a machine which is used mostly as a mail server: $ uname -a Linux myhost.com 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux and I would ...
2
votes
1answer
125 views

How to get a bash prompt in a ssh tunnel with rsa keys?

After setting client and server with the public keys and allowing PubKeyAuthentication yes, I issue the following command and get a shell that waits indefinitely. mad@amd:~> ssh -T ...
0
votes
0answers
148 views

sshd : locale not set with `UsePam no`

I even did reinstallation for this thinking something was wrong, and here's what I've found. #usepam=no Using username "sysadmin". Authenticating with public key "rsa-key-20130918" sysadmin@ubuntu:~$ ...
1
vote
1answer
44 views

Select set variable value in SSH session

I'm writing a shell script. It will run from machine A, which will SSH into machine B and prompt the user to select a build folder. It'll then copy it to machine A, but I don't know how I can have the ...
0
votes
0answers
243 views

Enable FTP disable SSH

I would like to know how enabling FTP access while disabling SSH access for all users except root and admin. I tried to change the shell : /usr/sbin/nologin is no good because disable both and ...
0
votes
1answer
90 views

Environmental variables in login shells and interactive shells

I'm sort of confused of login shells and interactive shells. If I run ssh my_remote_server 'echo $HOME' I can get /home/shawk But when I run ssh my_remote_server 'echo $ANOTHER_VAR' I got a ...
0
votes
3answers
76 views

Temporarily transferring shell settings to remote ssh session?

I am curious, frequently I would like to transfer all of my shell settings (dotfiles) over to a remote session just during my session and then have them reversed when I logout. Even better would be ...
1
vote
2answers
46 views

Remote shell account security

With a shell account like one of these http://shells.red-pill.eu, I would like to schedule chron jobs to backup from Google Drive to SugarSync. How secure are those servers? Can some obscure admin ...
3
votes
1answer
82 views

Is there any benefit to exiting nested SSH sessions, as opposed to closing the entire terminal application?

The question should hopefully sum things up, but essentially, I'm in a bunch of SSH sessions, some of which have additional SSH sessions to other hosts. Are there any negative impacts to simply ...
0
votes
0answers
43 views

libssh vs alternative root users

Here is an excerpt of the /etc/passwd file on a remote machine. root:x:0:0:root:/root:/bin/bash valid:x:0:0::/home/valid:/bin/rbash As you can see, valid is an alternative name for root. I can ...
2
votes
3answers
392 views

How to paste multiple Bash commands into a shell without losing some?

It's nice to copy-paste a series of Bash commands that you find on a website. But depending on the commands, sometimes you lose a few. Maybe they get swallowed up by programs that read from standard ...
4
votes
2answers
148 views

Wait until SSH succeeds creating a port forwarding

I am calling ssh (OpenSSH) from a OSX/Linux-C++-Application via fork/exec to create a dynamic port forwarding. This is done using batch mode (-o BatchMode=yes) and a private key which is supplied to ...
2
votes
2answers
442 views

Log in with different shell when original shell is “broken”

I managed to do something catastrophically stupid and below rookie level. Clean install on my FreeBSD VPS, then upgraded to version 9.1 (from 9). For some unusual reason, rather than installing ...
4
votes
4answers
388 views

A decent remote shell from UNIX to Windows?

Scenario I'm on Linux and develop on a Windows 7 box virtualized via VirtualBox. My usual way of developing consists in editing source files from Linux via nautilus/SMB (smb://192.168.1.4/...) then ...
0
votes
2answers
33 views

How to automatically remember the last path where I was? [*nix]

Is there any scripts or tools that can automatically remember and write down the path I am? I asked because, when I was remote accessing my campus cluster via ssh last night, they will log me out ...
6
votes
2answers
264 views

How to connect to a SSH session that was backgrounded with -f -N?

I'm doing some work where I need to pivot off a machine using proxychains so I'm connecting to a system and binding a local port like so... ssh -f -N -D 9000 user@host.com … which returns me back ...
0
votes
1answer
107 views

ssh sudo command to local machine

I have two machines master, slave. They have passwordless ssh setup between them. i.e master -> master and master -> slave I noticed the following problem user@master$ ssh master sudo whoami sudo: ...
0
votes
0answers
70 views

script on a remote machine that archive files fails

I have a simple script (Given below) on a machine that collect files from several folders into a single one and then archive it. The script works as expected on the remote machine. When I run it via ...
1
vote
0answers
64 views

Why is there a long delay when using `nohup` on Linode

I have a shell script like: for((i=1;i<500;i++)) do python get_sequence.py done I want to run it on a Linode VPS. It would take a few days to run, so I'm going to use nohup ./run.sh &, so ...
2
votes
1answer
401 views

SSH Session Started from Here Doc Does Not Exit Properly

SSH session doesn't terminate and give the tty back when executed inside a here document. Below is the code snippet that's inside my shell script: ssh -t -t root@$HOST_ADDRESS <<TERM_STRING cd ...
1
vote
3answers
2k views

How to grep logfile via SSH on multiple servers?

Sometime, I need to find out specific log content(such as api call) from log files, those log files exists in several Linux servers. I have to use SSH to login every server and use grep searching the ...
0
votes
3answers
50 views

Perform shell operation through secure shell

Is it possible to perform a shell operation from a bash script through a secure shell. Here is an example of why you may want to do this. Lets say you have a simple unix operating system that you ...
1
vote
2answers
335 views

Difference between running commands locally vs using SSH to make remote commands

I am trying to SSH into a remote machine, and run a .ksh file on a that machine to run a Java program. If SSH into the machine with a tool like Putty, and run this command: cd ...
0
votes
0answers
88 views

Running different programs via ssh

I got some problem when I tried to run different programs via SSH. The problem is, let's say I have 2 different java programs, then I would like to run them simultaneously on different JVM, in order ...
1
vote
1answer
86 views

disowning a process before it starts

Is it possible to disown a job at startup w/ out manually pausing the process? Basically the issue is, is that I'm iterating through a number of processes using a python script. I can manually disown ...
1
vote
2answers
1k views

loading local shell aliases to ssh session dynamicaly

When I log in to some machine using ssh I wish my aliases and functions are there. In other words, log in to some machine I wish I can use my command shortcuts. I need it be dynamic, every time I'm ...
1
vote
1answer
64 views

ssh starting with commands

I want to add alias that ssh to remote machine, run few commands on it and then give me back the control to continue using this machine. when I'm trying to run: ssh machine_ip 'command' the SSH ...
0
votes
1answer
218 views

Reverse SSH Tunnel Connection

If I issue a command to set up a reverse shell: grebwerd@bt:~$ ssh goldberd@whatever -R 10000:localhost:22. I was wondering, when I issue this command, it connects me to grebwerd@whatever, what ...
0
votes
2answers
130 views

ssh warning message

Is there a way to avoid ssh login warning messages while login to remote server through scripts? But I do not want to change any configurations in remote server, but in scripts or any options.
4
votes
1answer
83 views

Launch only the command if the previous one worked inside SSH, shell

I've got a SHELL script which is using a pipe to separate my two commands: ssh -oBatchMode=yes user@hostname "mysql -u yop -pyop -c yop | echo test" The problem is even if my connection to MySQL ...
1
vote
3answers
485 views

Running script on multiple ubuntu computers automatically

I have many ubuntu 10.04 computers. Is there any program that can allow me to select a shell file, and have it automatically log in to each computer of a list of computers (through say ssh), and ...
0
votes
0answers
25 views

Tab Auto-Completion in Mac OS X when using sftp in terminal [duplicate]

Possible Duplicate: Tab Auto-Completion in Mac OS X when using sftp in terminal i have been getting very frustrated lately since the readline functionality has been removed from MacOSX and ...
2
votes
1answer
89 views

Using SSH, transfer webURL to remote machine

Hi so i was doing some research in the library so i could use some pictures later on my Desktop computer in my room. I have space on my Lab account which i usually SSH into, and i was wondering if ...
3
votes
4answers
394 views

When I ssh into a ubuntu machine, what kind of shell am I using

I keep reading about interactive, non-interactive, login, and non-login shells. (This is in the context of which of the .bash* files is read). I don't understand what each type of shell is, so let's ...
2
votes
2answers
110 views

Can I use an ssh client or something similar to run commands on the local machine from a remote machine?

I have a machine which I cannot ssh into. I would like to be able to have controll a shell session in it. Is there some way to have it connect out to another machine and for me to issue commands on ...
2
votes
2answers
1k views

Retry dropped ssh connections

I use ssh -L -g, but intermittently the connection is lost, thus: $ ssh -L 8080:localhost:8080 example.com -g Last login: Tue Apr 24 07:19:04 2012 from 203.0.113.123 Read from remote host ...
0
votes
2answers
2k views

Know disk space using ssh remotely using shell script

I am using following commands to extract the disk space using ssh remotely. but wants to iust store the output instead of all other message as below; Any help? or any alternative solution? ssh ...
0
votes
1answer
481 views

“noshell” for ssh proxy users

I like to setup a special ssh user which is only allowed to tunnel web traffice through my server. I do not want to make an open proxy. This brings me to my question: Is there a "noshell" shell for ...