SSH (Secure SHell) is a protocol for running commands on a remote computer.

learn more… | top users | synonyms

0
votes
0answers
20 views

Clone git repo via ssh'ing from another pc

How can I clone git repos in a non-interactive way as follows: for h in server1 server2; do ssh $h "git clone git@gitlab.com:username/reponame.git" done When I interactively clone the ...
6
votes
3answers
9k views

Channel 0: open failed: administratively prohibited: open failed

I was doing this tutorial, but when it comes to the part where O should run these commands: local-server# ssh -NTCf -w 0:0 87.117.217.27 local-server# ssh -NTCf -w 1:1 87.117.217.44 It says: ...
2
votes
0answers
28 views

Enable tty console login while “A stop job is running” (stop running forever, preventing shutdown)

A message like this one is often shown on shutdown: "A stop job is running ..." (nfs mount) This apparently even happens when the NFS server did not go away. But even if the connection to the NFS ...
0
votes
0answers
56 views

running iperf over ssh

I'm trying to benchmark the network connection between 2 ubuntu servers on which I don't have root privileges. I did manage to download and start iperf-2.0.9 on both boxes. My problem is I can't ...
15
votes
4answers
20k views

How can I track who SSH'es into my linux machine?

I'm running Ubuntu 10.04. Is there a way I can get a daily report of who has logged onto the box, what time, and even - this may be asking too much - a report of the commands they used? This is a low-...
2
votes
2answers
1k views

.ssh/config way to specify pseudo-tty allocation and command execution

Is there any way to specify, in .ssh/config, a command like: ssh -t remote-host "screen -dR screen_name" so I can easily access the remote screen session with ssh remote-host? Right now I solved ...
1
vote
2answers
701 views

Why is my ssh connection unauthorized although I have updated my key on the remote machine?

On my local machine I have a public key stored in .ssh/id_rsa.pub To be able to log in to a remote machine I copy this key using ssh-copy-id: ssh-copy-id user@remote-host On the remote host, I ...
11
votes
5answers
40k views

ssh Connection refused: how to troubleshoot?

I'm trying: $ ssh eric@myserver where myserver is a machine in the intranet. I can ping myserver or respond to HTTP on port 8080, etc, but when I try ssh, I get ssh: connect to host myserver port ...
13
votes
3answers
14k views

ssh port forward to access my home machine from anywhere

http://serverfault.com/questions/303937/how-to-make-freebsd-box-accessible-from-internet I want to understand this whole process of port forwarding. I read so many things but failing to understand ...
1
vote
1answer
56 views

SSH Not Responding

Today when I tried to ssh into a remote server with my own credentials, I got no response at all, the command just hanged there after I pressed enter. I can ping the server and I also tried nc -v -w ...
1
vote
2answers
19 views

How can I know which specific private key is used for 1 ssh connection?

I cannot find from my linux box in which file the private key is stored. In below testing, my findings is , there is no ~/.ssh.config file, nor ~/.ssh/id_dsa or equivalent. From the testing result, ...
11
votes
2answers
365 views

Linux iptables ssh port forwarding (martian rejection)

I have a Linux gateway performing NAT for my home network. I have another network which I'd like to transparently forward packets to, but only to/from specific IP/ports (ie. not a VPN). Here's some ...
24
votes
5answers
27k views

Is there ever a reason to use scp instead of rsync?

Is there a reason to use scp instead of rsync? I can see no reason for using scp ever again, rsync does everything that scp does, with more safety (can preserve symlinks etc).
0
votes
1answer
62 views

How could I know my server's operating system? [duplicate]

I’m connected to my shared hosting server via ssh, and all I know is that it’s under Linux. I tried commands like: cat /etc/issue/ and lsb_release -a but got: $ cat /etc/issue/ No such file or ...
1
vote
0answers
37 views

Is it possible to open an ssh session and use it as a tty? [closed]

I am trying to send some commands to modify some configs in a cisco router, however, the process must be interactive. For some reasons, I'm not allowed to use tools like expect, so I thought I could ...
0
votes
1answer
50 views

Single source for both .ssh/config and /etc/hosts

I'm looking for a DRY solution that would allow me both ssh server-alias and ping server-alias I know the former is reading .ssh/config, and the latter /etc/hosts, but I'd rather not repeat the ...
6
votes
2answers
33k views

What is the default idle timeout for OpenSSH?

I can't seem to find an answer to this simple question, which I need for some compliance documentation. On a default install of CentOS 6.5 (OpenSSH 5.3p1-94.el6), after how long of being idle will ...
0
votes
1answer
97 views

ssh authentification without-password is not working anymore

I used to run an ssh without password on my servers (after I copied my id). Today, it stopped working, here is a debug: OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /...
-1
votes
1answer
42 views

ssh login does't work using key without password

It seems that id_dsa doesn't exist and it tries id_ecdsa, but it's there and I tried to regenerate it several times and still doesn't work. any one has the same issue and solved? or any one know how ...
2
votes
0answers
51 views

Passwordless SSH access not working with rejected message

I setup SSH passwordless access between two Linux hosts. But passwordless access is not working. Authentication is cancelled with a rejected message as shown below su - wsync -bash-4.1$ ssh node-...
3
votes
1answer
3k views

Chroot gone wrong, can't ssh with user

Distribution: Scientific Linux 6.5 (Carbon), not exactly your typical brand of linux. Tried to chroot a user using these instructions for SSH and quite obviously failed, and now I can't even log in ...
37
votes
4answers
63k views

Is there a command to list all open displays on a machine?

When SSH'd locally into my computer (don't ask, it's a workaround), I can't start graphical applications without running: export DISPLAY=:0.0 If I run this first and then run a graphical ...
3
votes
1answer
957 views

sudo -u git clone

I'm on Ubuntu server 14.04. I am using apache web server which runs as the www-data. I need to do git clone from a script (a web hook). This script will run with www-data user privilages. Running ...
0
votes
1answer
588 views

SSH, FTP, HTTP stopped working [closed]

I'm facing a problem with a Linux webserver of mine. It's a VM Ubuntu 10.4 LTS which runs a Wordpress network site. Out of the blue with no changes being made on the back end, ftp has stopped as has ...
1
vote
1answer
3k views

Ubuntu Server - Access webserver from other LAN computer, setting up SSH or FTP, closing ports?

I'm running Ubuntu 11.10 x64 Server, with apache2 installed. The setup is pretty much default configuration. I have a few questions about; DocumentRoot/Static IP/Connect from LAN/SSH or FTP?/...
42
votes
4answers
40k views

How to avoid being asked passphrase each time I push to Bitbucket

I set up my ssh stuff with the help of this guide, and it used to work well (I could run hg push without being asked for a passphrase). What could have happened between then and now, considering that ...
1
vote
2answers
995 views

Scp command over ssh without password in script

Here is my problem: I would like to perform scp command after ssh to remote server without typing any passwords. I describe my steps. My first steps were: ssh-keygen -t rsa and local@host$ ...
3
votes
1answer
60 views

Cannot login SSH with key, always asking password

There is a issue confusing me for couple of days. I have 3 Servers. A, B and C. I want access B and C from A via ssh. I have set public key/ authorized_keys ... on A,B,C. Scenario #1: Access B(.133)...
12
votes
4answers
38k views

sudo over ssh: no tty present and no askpass program specified

I keep getting this error and have tried several ways discussed online to fix this and none are working for me. I have setup SSH keys so when I run 'ssh newton@host.com' it automatically logs me in, I ...
11
votes
7answers
33k views

How do I work with GUI tools over a remote server?

I have an Ubuntu server running on EC2 (which I didn't install myself, just picked up an AMI). So far I'm using putty to work with it, but I am wondering how to work on it with GUI tools (I'm not ...
0
votes
0answers
32 views

How to fix system after wrong permissions? [duplicate]

I changed permissions on / by mistake using chmod -R 755 /* instead of ./* after doing sudo -s. I stopped the process in the middle of it after realizing what was going on. But it was too late. Now ...
2
votes
1answer
43 views

redirect output of command to /dev/null

I run the following line from my bash script in order to run the script /usr/run.pl on remote machines xargs -P "$numprocs" -I '{}' -n 1 -- perl -e 'alarm shift; exec @ARGV' -- "$timeout" ssh -...
0
votes
1answer
47 views

Expect Rsync with Double quotes

Below is my code: #!/usr/bin/expect -f set timeout -1 spawn rsync -arvz -e 'ssh -p 1690' --protect-args --progress /home/pappu/ 'backup@xx.xx.xx.xx:/volume1/56 - Backup Server/pappu' expect "password:...
0
votes
0answers
27 views

SSH using script not working , but normal ssh working fine

[fm@serv1 new_dir]$ . ./env_call.env [fm@serv1 new_dir]$ ssh ${serv2} "/tmp/new_dir/backup.sh ${env}" Permission denied, please try again. Permission denied, please try again. Permission ...
0
votes
5answers
996 views

How to make the script automated to take password on its own?

I have a script that is doing sftp some files from one server to another, like inside the script script.ksh I have the below lines; sftp user@ip_address << EOF cd path put file1 bye EOF When ...
1
vote
0answers
71 views

Why is it not possible to connect to my server using RSA from an Ubuntu machine?

I tried to connect to my server using ssh xxxx@xxxxxxx.xxx The result was: Unable to negotiate with xxx.xxx.xxx.xxx port 22: no matching host key type found. Their offer: ssh-dss Then I ran ssh ...
1
vote
1answer
2k views

Fail2ban with firewalld

I'm trying to configure fail2ban to block ssh from a local hosts. Fail2ban is install on CentOS 7 with firewall (Linux 3.10.0-229.4.2.el7.x86_64 x86_64 ). I have copied the jail.conf to jail.local i ...
0
votes
0answers
23 views

Create user who can only ssh and reboot machine [duplicate]

I have a problem when I want to create user for SSH and rebooting the machine only. What I did is I just created a normal user. But normal user can access other commands like reboot, vim, ps, etc. I ...
1
vote
0answers
49 views

Garbage characters when using serial connection over SSH connection with minicom/screen

I have a serial connection made with /dev/ttyUSB0 locally from my laptop to a cisco lab router and using minicom/putty/screen all work fine locally (hardware control: on, software control: off, 9600 ...
0
votes
0answers
44 views

key load error on trying to ssh to server [closed]

I get the following error when trying to ssh into a server running Mac OS X. The client is also running Mac OS X. ssh -v server.lmd.edu OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration ...
17
votes
10answers
69k views

Automatically run commands over SSH on many servers

There is a list of IP addresses in a .txt file, ex.: 1.1.1.1 2.2.2.2 3.3.3.3 Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is ...
0
votes
1answer
62 views

Script wont return when executed via SSH

I am calling a script via ssh client like this: ssh root@host "su - oracle -c '~/bin/weblogic start'" The ~/bin/weblogic is a bash script that actually starts the web server in the background and ...
1
vote
0answers
57 views

How to send sudo password over pipe? [duplicate]

I need to replace existing sshd config on the remote PC and restart sshd, so I try to use this: cat /sshd_cfg | ssh user@192.168.0.47 "cat > /etc/ssh/sshd_config && service sshd restart" ...
4
votes
1answer
749 views

SSH server always available under heavy load

Is there a way my SSH server, and everything under it (including bash) can be always available under heavy load ? Maybe it could be some kind of a critical path, all in memory, with a dedicated CPU ...
6
votes
1answer
94 views

What does '?' represent under TTY

If you run ps in your terminal, you may see something like the following: What is ?? I'm ssh'ing into a Linux server, so I assume that it's just the sshd as it says under CMD, but I'm curious what ...
2
votes
0answers
74 views

ssh connection to OSMC fails after giving the correct password

I have a freshly setup Raspberry Pi 3 with OSMC; I can't login via ssh. I can open a shell when using my wireless keyboard, sudo -s works, and AFAICS, WiFi connection is fully functional, including ...
13
votes
2answers
13k views

How do I force a user to change a password at the first time login using ssh?

I'm trying to force a newly created user to change a password at the first time login using ssh. For security reasons I want to give him a secure password until he logs in for the first time. I did ...
2
votes
2answers
326 views

Run a ping command on list of servers and output to a file

I have a file servers.txt on a different server, with list of servers: server1.mydomain.com server2.mydomain.com server3.mydomain.com I want to first download this txt file, ping these servers and ...
3
votes
0answers
46 views

SSH with chroot and only working “sftp”, “rsync” (both)?

I have two users and one shared folder in my Ubuntu server: User writer, which has write access to /var/shared. It's an application regularly making file changes in this folder from remote, with SSH ...
0
votes
2answers
39 views

SCP command keeps asking password

I've been struggling for days with this now and can't find what I'm doing wrong. I've got a website on a VPS server. Every night I make a backup of the database. It gets stored on my VPS server. I ...