2
votes
2answers
26 views

SSH remote command no reading all environment variables

I have declared some "PATH" variables in the ".bashrc" file of a remote machine. When I login to the remote machine, all these "PATH" variables work fine. But when I do a "ssh user@remote env", the ...
-1
votes
3answers
80 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 ...
1
vote
5answers
86 views

how to copy entire linux root filesystem to new hard drive on with ssh and tar

I know I've found this information before, but can't remember the right google query. I need to transfer an entire linux root filesystem off of a failing hard drive onto another computer with an ...
0
votes
0answers
29 views

Shell doesn't appear when connecting to RasPi via SSH

I have a raspberry pi with Arch Linux ARM installed. I would like to run commands via my laptop. I configured SSH correctly and I can log in, but I can't do anything. There is no shell. ssh user@host ...
0
votes
2answers
43 views

How do I remotely execute scripts on multiple servers, mix output

Hi I'm looking for a piece of software or some sort of technique that would enable me to do following in one terminal window: Take as input a list of ssh-enabled machines with login, password and ...
0
votes
3answers
59 views

does ssh have a facility to exchange files when already connected?

I never heard this possible, so probably the answer is not. But maybe someone knows better. I know you can use sftp to exchange files between host and remote, and you can both: sftp from host to ...
1
vote
3answers
42 views

Auto propagation of bash settings across many machines?

I need to console to many machines through SSH. Including Linux, Mac, mobile devices, virtual machines. Sometimes I need to login to more than 10 machines in one day. I enjoy my personal .bashrc or ...
1
vote
1answer
48 views

Information flow in Linux - how to tell who is currently active and typing?

I'm currently playing a mafia/werewolves game with my cyber-security class. The basic idea is: on one machine, the moderator starts a server program all the players ssh into the machine and launch ...
1
vote
2answers
30 views

ssh backspace deletes one character instead of two (utf-8 symbols)

Im accessing a remote computer using ssh and running a bash command to input symbols using standard input stream: read test;echo $test It's ok to input english letters and use backspace to ...
0
votes
1answer
33 views

output of `svn status -uq` has no newlines in script

function runstatus { echo "SVN Status -uq:" echo status=$(svn status -uq) echo $status echo $bigline } This prints something like: SVN Status -uq: rd_backup ...
0
votes
2answers
53 views

Script to auto execute creation of ssh tunnel

I'm a CS student, and still learning a lot of these things, and so please bear with me if I don't have a full grasp on what I'm trying here. I'm on a Mac, connecting to a linux machine. I can set up ...
0
votes
1answer
80 views

how do I preserve export PATH?

How can I make ssh admin@nas command work if command is in /opt/bin? On my QNAP NAS File /root/.ssh/rc: echo "old path is $PATH" export PATH=/opt/bin:/opt/sbin:$PATH echo "new path is $PATH" on my ...
0
votes
2answers
83 views

Why does my ssh session terminate immediately?

I have a debian machine, where I have difficulties to log into via ssh. Executing commands on the server over ssh is no problem -- just I get no prompt, but the connection is terminated again: > ...
0
votes
1answer
23 views

How to configure secureCRT to remove content display after quit from vim

Open a ssh or telnet connection in secureCRT 6.0 or 7.0, when "vim xxx.txt", after quit vim by ":q", the content of xxx.txt will still be visible in screen. But in putty, the same operation, content ...
1
vote
1answer
67 views

I accidentally deleted my /root folder and now my shell string is different. What gives?

I stupidly managed to delete my /root folder on CentOS. I re-created an empty /root folder and set root privs to it, but now my shell string in PuTTY is different. Whereas it used to say ...
0
votes
1answer
47 views

kill running script (I think I must allocate terminal)

I was wondering how to kill a running script in this situation: Two machines; machine1 and machine2. machine1 writes: ssh machine2 << 'ENDSSH' ./script.sh ENDSSH causing the script to be run on ...
2
votes
1answer
56 views

SSH not reading rc files

Once upon a time, an ssh invocation to host1 like ssh u@host1 command would read .bashrc before executing command. host2 is administered by the same people, and reads .bashrc! I don't administer ...
2
votes
1answer
83 views

environment using su - vs “ssh user@machine” as a user on lucid

I'm trying to debug a shell environment issue on a machine running lucid. Both root & user have /bin/bash as their shell in /etc/passwd When I use "sudo su - user", my PATH includes the following ...
2
votes
3answers
40 views

save password once and use it from different terminal

I have script that runs remote login using SSH, copies a file from that remote machine using SCP without asking for a password, however, the change only works for the terminal where I am running the ...
2
votes
2answers
68 views

Unable to get profile variable using ssh

Unable to retrieve the profile variable using ssh. server2 ==> user apptst ==> bash profile has $APPHOME variable. Was trying to retrieve the value from server1 using ssh but failed. Used options ...
0
votes
2answers
76 views

Run windows bat remotely file from Linux over ssh

It is possible? Cygwin is installed on the windows environment. I connect to windows environment over ssh with follow command: ssh user@ip /cygdriver/c/run.bat. After introducing the password the ...
0
votes
2answers
50 views

working directory deleted

There are some 4 people who know my root password.And someone deleted my code directory. We have a single system where everyone has his own code base directory and everyone ssh to this system and ...
2
votes
2answers
117 views

Allow any user/password entry in ssh

I want to setup ssh so that one can login with any username or password and be accepted. If they chose a username and password of an actual user on the system they will successfully login and use ssh ...
0
votes
2answers
70 views

Find pid of a certain ssh instance

There can be more than one instance of ssh running: $ ps aux | grep ssh cpn 6098 0.0 0.0 58196 2032 ? S 10:08 0:01 ssh cz -nNCTR 5433:localhost4:5432 root 6313 0.0 0.0 ...
2
votes
1answer
111 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 ...
0
votes
0answers
124 views

Running tcpdump on remote machine with no tty using ssh

I'm trying to start tcpdump on several remote machines to perform some network analysis with a script, but I'm failing to run it correctly. The command I would like to use is: ssh user@host ...
2
votes
1answer
45 views

ssh not working with yes

I had to solve a fringe case lately where I had to add a number of server fingerprints to a user's known_hosts (the authorization is performed with a keypair). I thought the easiest solution would be ...
2
votes
1answer
203 views

SSH port forwarding with automatic reconnect, script executing at startup

In short, every time my computer boots, I would like to start a ssh port-forwarding connection that will reconnect with the server if the connection drops. Computer is Debian Wheezy x64. An initial ...
0
votes
3answers
33 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 ...
2
votes
1answer
171 views

Accessing a persistent ssh tunnel

How do I pass commands (shell) to a persistent SSH tunnel rather than open a connection for every instance? I have a Python scraper running on a client server which passes URL variables and shell ...
1
vote
2answers
44 views

Bash window title not restored after exit

I have a problem with the window title in the Terminal window on OS X: Start Terminal. Window title is "bash" Type "ssh external" to connect to an external server. Window title is "user@external:~" ...
1
vote
2answers
170 views

Running rdesktop through a SSH tunnel in one command

I am running ssh server -L 3392:192.168.1.138:3389 in one terminal window, then running rdesktop 127.0.0.1:3392 in another to connect to a Windows machine through an SSH tunnel. How can I merge this ...
0
votes
2answers
168 views

How can i use the `eject` command on a computer i have SSH'd into?

So if i do eject on my machine, it works exactly as expected, however, if i ssh into the machine next to me, and do the same thing, it does not work... my computer: eject: using default device ...
1
vote
1answer
259 views

sshpass installation

I want to use passwordless SSH for logging in. I used sshpass to achieve this. The problem is when I am trying to install sshpass through sudo apt-get install sshpass. It asks for password. After I ...
1
vote
2answers
147 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
143 views

Redirect output of remote python app started through ssh to file

I have a python app in a remote server that i need to debug, when I run the app locally it prints some debug information (including python tracebacks) that i need to monitor. Im trying to redirect ...
1
vote
3answers
270 views

Term Enviroment Variable not set, when executing a Bash File via SSH

i am trying to run a bash script on a remote machine. If I open a ssh connection in a terminal, i can easily run the script. But when i run it like that: ssh user@ip < /etc/script I get an ...
0
votes
1answer
313 views

ssh config under cygwin

I have Cygwin installed on Windows 7. I made default install. I would like to use ssh config file (~/.ssh/config) to set host and options for connecting. Normal ssh command is not able to find the ...
0
votes
1answer
35 views

unset LC_* previous to ssh

In my ~/.bashrc I have environment variables definition similar to export LC_CTYPE="es_ES.UTF-8" when I use a ssh connection some of this variables have problems in the remote computer man: can't ...
0
votes
0answers
24 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 ...
3
votes
4answers
211 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
1answer
124 views

Why is pasting into SSH so painfully slow?

Most of the time whenever I post reasonably large chunks into an SSH terminal, it will absolutely crawl through it at a rate of something like 1000 characters every 20 seconds; sometimes practically ...
0
votes
3answers
329 views

How to make bash aliases available as linux commands?

I have many bash aliases on a remote location. But when I try to run those from my local linux box, I get the 'command not found' error. e.g. $ ssh root@remote 'status' bash: status: command not ...
3
votes
1answer
161 views

Run script on login with ssh

I have a feeling this is quite easy to do but every solution found on google has to do with adding a script to be run whenever someone logs into the machine. What I am looking for is a way to run a ...
3
votes
1answer
107 views

Linux terminal - frozen update of input but can execute commands?

How do I restart a shell session from within SSH when it looks something like this: anton@ubuntu:~$ c: command not found anton@ubuntu:~$ lib ...
3
votes
2answers
1k views

ssh Permission denied only in cron job

Having a very strange problem. I've created a small bash script which runs a command on a remote host via ssh (using public key authentication). When I run this script manually from the command line ...
1
vote
2answers
158 views

Automate a remote rsync command using bash aliases?

I deal with lots of servers that often have files and folders which are not under version control. This means I can just git remote add if I need to work with the files on my local machine. With that ...
0
votes
2answers
110 views

How to remove 'connection to xx.xxx.xx.xxx closed' message?

#!/bin/bash ssh -t $SSH " some commands " Where is the 'connection to xx.xxx.xx.xxx closed' message coming from? I can't stop it even with result=ssh ...
4
votes
2answers
491 views

How to check if any errors occurred during ssh?

I'm writing a deployment script, and I need to rollback if any errors occurred. Eg: #!/bin/bash ssh myapp ' mkdir /some/dir # check if above command failed, and execute rollback script if ...
1
vote
2answers
182 views

How to avoid having to type password every time rsync is run in a Bash script?

In a bash script, I have several rsync statements. Every rsync will prompt for typing password, and defeats very much the automation of doing the job using a script. How to improve this? The ...

1 2 3