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

learn more… | top users | synonyms

45
votes
6answers
54k views

How can I run ssh-add automatically, without password prompt?

I want to communicate between several computers on my network (static ethernet), through ssh. In order to do that I need to run ssh-add every time I login on specific machine, how can I do it so that ...
2
votes
2answers
959 views

Non-interactive shell expand alias

I'm having trouble getting aliases to expand on my hosting account when I run a command like: ssh user@server "bash -c \"alias\"" My .bashrc file is: echo .bashrc # .bashrc shopt -s ...
1
vote
1answer
2k views

OpenSSH hangs after login without showing login prompt

I ran across an issue with ssh after fresh Ubuntu 13.10 installation on Lenovo T420. I tried git pull (which failed) and this led me to more general ssh failing. After spending some 2-3 hrs of ...
7
votes
1answer
125 views

Blocking SSH Brute Force attacks on IPv6

I recently had to work with some servers that have an IPv6 connection and I was surprised to find out that fail2ban does not have IPv6 support, neither does denyhosts. Searching on google I found that ...
4
votes
1answer
63 views

After sending shutdown command, ssh session doesn't terminate

Whenever I send the command to turn off or restart my Debian servers, my shell is left hanging and unresponsive (can't type any commands). Performing the same action in Ubuntu results in the ...
0
votes
1answer
40 views

Cant use scp with wdmycloud

I can successfully log in to mycloud as root or another user I added. I need to use the scp command to send an image to my folder. It keeps asking for the password and saying its wrong when I know ...
33
votes
4answers
12k views

What is a better way to deal with server disconnects of sshfs mounts?

I have several directories mounted through sshfs. I sometimes get disconnects from the server (not configurable by me). I usually mount the directories like this sshfs ...
0
votes
0answers
29 views

cannot ssh to Fedora 21VM from local-desktop

I verified that ssh is running on VM, however port 22 is not responding. [root@localhost log]# ps ax | grep sshd 5343 pts/0 S+ 0:00 grep --color=auto sshd [root@localhost log]# systemctl ...
0
votes
0answers
20 views

Browser is ok but can't direct internet through a shadowsocks server

Ok it seems an easy thing but I just couldn't make it work after lots and lots of searching. I have Ubuntu 14.04. This is config.json file including configurations of my friend's server running ...
3
votes
1answer
60 views

Where are SSH init scripts located?

I'm following the best security practices of SSH, via this link and the link states: We should remove the unused keys and only generate a large RSA key and an Ed25519 key. Your init scripts may ...
1
vote
1answer
1k views

Double port forwarding - SSH

NOTE: I'm not explaining why I want to do this. But here is the requirement. There are 4 hosts. Host A, Host B, Host C, Host D Host A is running some application which can be accessed at port 8001 ...
-1
votes
0answers
33 views

Can't secure copy to wdmycloud with ssh [duplicate]

I can successfully log in to mycloud as root or another user I added. I need to use the scp command to send an image to my share. It keeps asking for the password and saying its wrong when I know it's ...
4
votes
2answers
76 views

Is it possible to escape quotes within escape quotes within escape quotes within escape quotes?

I'm guessing someone will tell me I'm doing something wrong and dumb and noobish, but I'm trying to script something in the most straightforward method possible and use sudo commands to do something ...
2
votes
1answer
51 views

SSH command not exiting properly [closed]

I wrote a script that SSH to remote servers in loop and run a command, it gets hung after running on last server.Here is my loop script - cat server | while read serName do ...
30
votes
8answers
20k views

SSH to decrypt encrypted LVM during headless server boot?

When I installed Ubuntu 10.04 and, now, 10.10, I was offered the option of enabling "encrypted LVM" for my hard drive. After choosing that option, I am prompted for my password during boot to decrypt ...
0
votes
2answers
27 views

“Replace” default shell (bash) with tmux

Background: An co-worker at my company uses tmux all the time, in our spare-time he teached me mastering tmux and vim and I really fall in love with the power of this combination. Currently, I am ...
0
votes
3answers
64 views

Port is open but I can't ssh to it

My company PC is behind the firewall, I want to connect to my remote server. The port is open however I can not connect to it, does anyone know the root cause? From my company PC connect to my ...
3
votes
1answer
2k views

SSH agent forwarding, multiple hop

I tested this setup with Linux origin machine - everything is the same - only the first hop can use keys from origin machine. Initial problem I'm trying to set up SSH agent forwarding with multiple ...
0
votes
1answer
56 views

ssh login with a tunnel through intermediate server in a single command?

Is there a way in a single SSH command to login via SSH to a remote server passing through an intermediate server? In essence, I need to create a tunnel to my "bridge server" and via the tunnel to ...
1
vote
2answers
121 views

remote shell - are there any non-ssh based alternatives?

Are there any alternative SSH servers other than SSHD? One that is not SSH based? Ideally one that can be installed from offical Debian repository, that listens on a port other than port 22. (To ...
2
votes
1answer
40 views

rsync over SSH sometimes very slow--other times maxes out bandwidth

I have a bash script set up on computer A (Mac OS X) set to run every five minutes via a cronjob. This script checks for new files on remote computer B (Gentoo Linux) then rsyncs any new files to ...
1
vote
0answers
15 views

How do I use the “screen” command if I don't know what the ps or tty the program came from?

I am making a python program that launches on bootup, and I would like it so that I can interact with that program via the "screen" command, so that if I need to talk to the progarm via a different ...
15
votes
4answers
19k views

How do you copy the public key to a ssh-server?

Here is what I have tried, and I got an error: $ cat /home/tim/.ssh/id_rsa.pub | ssh tim@just.some.other.server 'cat >> .ssh/authorized_keys' Password: cat: >>: No such file or directory ...
1
vote
1answer
22 views

Estimating time to send a single file with fixed network throughput?

Let's say I have several files with different sizes (10KB, 100KB, 1MB, 10MB, 100MB). Starting individual transfer of those files over 2MB per second network will return different final throughput ...
2
votes
1answer
57 views

SSH requires password for first login

So I've got a strange issue going on with SSH. I've setup my ssh server to allow passwordless logins via sshkeys. However, when I try to login, the first time I login in a long time (~day), it ...
1
vote
2answers
11k views

Colorful ssh banner

I would like to colorize my ssh banner. I know I can perform it like so: In /etc/profile I can put: echo -e "\e[1;31m Colorful text" echo -e "\e[0m Reset" But I have some ASCII art in the banner ...
5
votes
2answers
1k views

Non-ASCII printable characters in sshd banner

It's possible to configure a banner for sshd that is to be displayed as a connection is opened, via Banner /etc/motd.ssh in sshd_config. Note that this is displayed before the authentication occurs, ...
2
votes
1answer
39 views

How can I remotely access an intranet website from an external network via an SSH tunnel?

I recently setup FreeIPA on an internally accessible system at home. I'd like to manage this web UI from networks that are external to my LAN, but at the same time, I don't want to have to expose this ...
-1
votes
1answer
21 views

the sudoer can't restart ssh service on debian8.1

I have installed debina8.1 ,set the sudoers configuration this way. 1.apt-get update 2.apt-get install sudo 3.adduser test 4.usermod -a -G sudo test When i connect vps with test account name, and ...
3
votes
1answer
222 views

How to access my local network from anywhere over ssh?

What do I have to do to be able to access my local network over ssh with a dynamic IP address?
0
votes
0answers
10 views

SSH - using a command on remote system to execute a local script [duplicate]

On a remote machine, I have a file that I want to open on my local machine. The local program accepts certain SFTP URLs. For example: local_program sftp://remote.host/~/file.txt I want to use an ...
2
votes
1answer
63 views

Does `ssh -D` proxy DNS request?

Is DNS resolution tunneled to the other end when I use a SOCKS proxy created with ssh -D? I have read the manual, searched the Internet, and found no documentation relevant.
2
votes
0answers
23 views

Data written to /dev/pts/x inside SIGINT (Ctrl+C) handler is randomly discarded [closed]

Have Archlinux64 on VirtualBox. If I declare a SIGINT trap like this: trap 'echo x' INT inside an ssh session (running bash) and press Ctrl+C multiple times, only a few times does something appear ...
0
votes
1answer
16 views

How to customize port in filezilla to connect my vps?

The port of target vps is 28399 ,not 22 ,i want to connect it with filezilla. I found that the port can only be 22 ,how can i customize the port ,make it to be 28399 or any other number?
0
votes
1answer
2k views

How to execute Netscaler commands through a remote machine via SSH connection

I have been trying to execute some NetScaler commands like "bind" & "unbind" through a Linux Box via an SSH Connection. Now the Problem is, Manually we are able to enter & execute commands on ...
2
votes
3answers
50 views

strange ssh problem: “open failed: administratively prohibited:”

I have a VPS to be set as my socket5 proxy, the Firefox plugin AutoProxy was installed. ssh -p 2034 -D 127.0.0.1:1080 root@vps_ip The port on my VPS is 2034. The command can work for some time, ...
0
votes
2answers
49 views

rdiff-backup operation not permitted

Objective I'm trying to execute the following command in my Python script: rdiff-backup --terminal-verbosity=5 --remote-schema "ssh %s -p1019 -i C:/Users/Adam/.ssh/private-passphrase ...
3
votes
2answers
5k views

Number of SSH connection(s) on a single linux machine

I landed up in a situation wherein I had to access a Linux machine via puTTY.I made various attempts to SSH but failed to connect to the machine. I then realised my colleague was accessing the same ...
1
vote
1answer
50 views

Exiting a script called from another script via SSH

Suppose that bash script X is being called within another bash script Y. If I directly execute script X on a local machine, after X's completion, the program exits to the terminal. However, when I ...
20
votes
3answers
9k views

How do I know if my ssh tunnel is created successfully?

I rely on the following script tunnel.sh written by others to keep a ssh tunnel alive: #!/bin/bash export SSH_HOST=tim@server if [ ! -f /tmp/.tunnel ] then echo "Creat SSH tunnel" ssh -f -D 9999 ...
0
votes
1answer
90 views

AWS VPC NAT | ssh_exchange_identification: read: Connection reset by peer [closed]

I had a tough misleading error while connecting in AWS VPC subnets. The error did occur in B->A connection, and did not happen while A->B, so at the beginning I thought that it is library bug. It ...
0
votes
2answers
47 views

scp not working without password

I created keys so I can transfer files and run commands without having to enter in a password. I used this guide to do it: ...
3
votes
1answer
43 views

SFTP on Raspberry Pi troubleshooting

I'm trying to create a folder shared with SFTP in my Raspi. There are some issues, which are reported to be related to folder administration rights. Trying to solve them seems useless. I'm reporting ...
12
votes
9answers
67k views

ssh_exchange_identification: read: Connection reset by peer

I am on OS X trying to ssh into a ubuntu 12.04 server. I was able to SSH in -- until abruptly stuff stopped working. I've read online to use the -v to debug this. Output is shown below. If I ssh into ...
13
votes
6answers
10k views

Copy input to clipboard over SSH?

Here's my usage case: I'm often connected to other computers over SSH for work and I often need to copy and paste documents/text from the server to locally running editors for writing examples and ...
0
votes
1answer
26 views

Unable to execute batch remote commands after pkill command

We've a scenario where I'm executing various remote commands at once like the following: ssh user@remote-ip " ps -A | grep java rm -rf /usr/share/tomcat/webapps/ROOT ls " The above set ...
0
votes
1answer
72 views

How to run multiple sudo commands over already opened ssh connection

I am trying to navigate from one server"USER1" to another using ssh as a user "USER2". ssh -t $hostname "sudo su - USER2; whoami; pwd" Post executing the above, I am able to successfully navigate ...
2
votes
1answer
235 views

Fedora 20: irqbalance problems in logs, strange behavior

I'm seeing unexplained network behavior, such as sporadic inability to reach beyond the subnet, passwords rejected for no apparent reason, and SSH attempts constantly yielding that irksome ...
0
votes
1answer
122 views

rkhunter warning about ssh root access when that access is not allowed on the system

I just ran rkhunter --check and all was good except this: Checking if SSH root access is allowed [ Warning] What does this warning mean? SSH root access is not allowed on this ...
3
votes
2answers
94 views

Toolbar icons unable to load when running Emacs through xhost from FreeBSD to Ubuntu

I'm connected to a FreeBSD Computer using ssh [ip] -X, and emacs launches just fine, but this happens and all the icons are little pieces of paper with red X's: > emacs (emacs:22812): ...