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

learn more… | top users | synonyms

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 ...
3
votes
2answers
88 views

pass variable in ssh

I'm trying to pass a variable to ssh remote but not works. My code is: #!/bin/bash set -x conexion="user@xx.yy.zz.pp" parameter="$1" ssh -T $conexion <<'ENDSSH' clear echo "$parameter" ENDSSH ...
-1
votes
1answer
24 views

execute a remote script from local script with ssh

I'm trying to execute a remote script from local script by ssh. If I do these from command line (local) works: ssh usertry@10.x.x.x <<'ENDSSH' /path_to_script/scrip.sh value ENDSSH But when ...
1
vote
1answer
28 views

passphraseless access to rsync with ssh through cron fails

I have setup ssh keys without a passphrase (Ubuntu) and copied them to my remote server (Centos6). I can login with ssh without a password successfully under my username. When I execute the ...
12
votes
1answer
888 views

How to execute an arbitrary simple command over ssh without knowing the login shell of the remote user?

ssh has an annoying feature in that when you run: ssh user@host cmd and "here's" "one arg" Instead of running that cmd with its arguments on host, it concatenates that cmd and arguments with spaces ...
1
vote
0answers
12 views

Using ssh -t works but using ProxyCommand ssh -W does not

I am trying to set up a ssh connection through a jump host. It should go like this A -> B -> C. I can connect fine from A to B and from B to C but I would like to have a single connection from A to C ...
0
votes
1answer
38 views

How do you add already generated ssh keys to linux machine?

I've used Putty on a windows machine to generate a key pair. I now want to add this key to my linux laptop. Is there a way to place my key into my .ssh directory to use when trying to access the ...
0
votes
0answers
28 views

How do I append a SSH key with JSON for Google cloud compute VPS?

For the following dummy key, in relation to adding ssh keys to a google compute cloud project: thufir@mordor:~$ thufir@mordor:~$ ssh-keygen -t rsa -b 768 -f ~/.ssh/gcloud -C thufir Generating public/...
49
votes
3answers
22k views

How can I break away from an SSH session that has crashed?

Many times I have an SSH session that doesn't respond anymore (for example, when I lose internet connection and then reconnect). Ctrl+C, Ctrl+D, Ctrl+Z and a zillion of key presses don't have any ...
2
votes
1answer
21 views

how does a google cloud compute generated SSH key lookup the VPS instance?

If I manually create a key, rather than using the gcloud CLI console, can I also configure the public key so that it will look-up the connection as this config seemingly does: thufir@mordor:~$ ...
3
votes
2answers
549 views

Unable to SSH into Google Cloud Server after Reboot

I was learning to configure a Debian server and familiarising myself with the common command lines. However, after executing the reboot command in SSH, my subsequent SSH connections were refused and ...
0
votes
0answers
15 views

How to set my own ipaddress for centos 7 via virtual machine [on hold]

Guys i am new to linux i have installed centos 7 via virtual machine in my laptop. But laptop changes one place to another for working. can set my own ipaddress for not change from place to place. I ...
2
votes
1answer
41 views

ssh very slow connection

I have several remote systems, and one of them, a linode running debian, is very slow to ssh into - it takes approximately 20-25 seconds every time. This seems to have happened relatively recently. I ...
2
votes
1answer
2k views

ssh tunneling: connection closed by foreign host

I'm trying to create a scenario to test a simple ssh tunneling, just for using a simple telnet. I have two hosts: ubuntu and suse. Both of them have the other hostname on /etc/hosts file for address ...
0
votes
2answers
53 views

Traceroute — where does it end when user is SSHed?

When you traceroute a user SSHed into a server, does the traceroute end with the server or the computer of the person SSHing? Or is the answer more nuanced?
-4
votes
0answers
37 views

Etc/SSH/sshd_config: permission denied [on hold]

I am trying to set up an SSH on my PC. It's running Kali. When I try to open etc/ssh/sshd_config using terminal it comes up saying permission denied. Does anyone know why it is saying this and how I ...
1
vote
2answers
1k views

sshfs - transport endpoint is not connected

After reinstalling the server I can not mount it sshfs root@domain.com:/var /remote_mount fuse: bad mount point `/remote_mount': Transport endpoint is not connected update # ssh root@domain.com ...
0
votes
0answers
30 views

Apache PostreSQL database server only

I was wondering if it's possible to use apache to make a postgresql database available for connections from the web without using a website to interface with the database. Instead of having a webpage ...
5
votes
4answers
19k views

Restrict FTP user to a directory

Sorry if this is an obvious question, but I don't have a lot of knowledge about this sort of thing, and I've googled for hours, nothing worked. So on a Ubuntu 11.04 server, I want to restrict a user ...
0
votes
2answers
31 views

Which layer(IP/TCP?) is netcat/socat working on?

I have this question because I want to know when we use netcat to do the traffic forwarding during 3 machine(A->B->C) ssh tunneling, is it possible for C to know A's IP address?
4
votes
2answers
32 views

Direct stderr to a file over ssh

I am trying to execute a command on a local machine and direct the stderr to a remote machine over ssh. I cannot do ssh remote machine "command 2>stderr.log" because the remote machine doesn't ...
3
votes
3answers
551 views

Input password into SSH without typing

At work, I access both a remote system via SSH and some web interfaces that login through LDAP. I use 1password to manage my passwords, but I can't seem to find a simple way to input the password from ...
1
vote
1answer
36 views

Which host key algorithm is best to use for SSH? [on hold]

When you first connect to an SSH server that is not contained inside your known_hosts file your SSH client displays the fingerprint of the public key that the server gave. I found from this question ...
17
votes
4answers
14k views

Autocomplete server names for SSH and SCP

I have a few servers configured in ~/.ssh/config, such as alpha and beta. How might I configure Bash such that the commands ssh al<tab> and scp file.tgz al<tab> autocomplete the names of ...
1
vote
1answer
43 views

Alternative to Google authenticator

I've set up Google authenticator as 2FA for ssh and it works great, but authenticator app for Android is not open source anymore. Is there a good real open source alternative?
0
votes
1answer
22 views

How does OpenSSH determine the choose the host key algorithm?

After updating raspbian and all of its libraries I noticed something different about SSH. When I delete the 'known hosts' file in my home and ssh into my box it provides me with the hosts public key ...
1
vote
1answer
1k views

Terminal colors putty raspbian

I'm connecting to my Raspberry Pi from my Windows Machine using putty. I already adjusted the colors for bold blue in putty to be more readable (using this guide). But I still have problems with the ...
0
votes
4answers
1k views

Permission denied when run script via ssh

I wrote script which download via scp and install some packages. SSH keys are added to host and when I run [root@HostB ~]# ./myscript everything is ok and packages are downloaded via scp without ...
0
votes
0answers
21 views

SSH path clutter [duplicate]

When using SSH, my path seems to contain all sorts of additional, strangely formatted info. This started happening a while ago, I'm not sure if any software updates caused it. How do I get rid of this ...
3
votes
4answers
19k views

ssh: Read from socket failed: Connection reset by peer

When I try to ssh to a remote host, I get the following error messages: root@cloudstack-server-1:~/.ssh# ssh ubuntu@172.17.4.17 -v OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012 ...
1
vote
2answers
2k views

iptables allow only ssh and vpn traffic

I have dedicated server with ubuntu 14.10 installed. The server should connect to an openvpn server and the traffic should only go through the vpn, except for SSH traffic. My idea is to realize it ...
4
votes
5answers
562 views

Does ssh send the password over the network?

Basically the entire question is in the headline: Does ssh send the password over the network? Presuming of course that login via username and password is used. I'm asking because if ssh doesn't send ...
2
votes
1answer
21 views

X11 applications over SSH receive bugged keyboard input [on hold]

After ssh -X user@host and launching an application (for example zenmap), keyboard input into the X11 window is broken. Typing 192... appears and functions as erp... Keys show up fine when typing ...
0
votes
2answers
44 views

Reasons for a server to be unreachable, How to investigate?

One of my server which host a mongoDB is, sometimes and "randomly" unreachable. After a while, it come back, like nothing happend. During this period, impossible to open an ssh tunnel (timeout, don'...
1
vote
0answers
24 views

Import/Export running GUI applications between localhost and SSH client running x11 forwarding? [duplicate]

I am running a Centos Linux server which I connect to using Putty/SSH with x11 forwarding enabled and an X11 server (Xming) running on the client machine... I am able to open GUI applications from my ...
1
vote
1answer
1k views

CentOS with AutoSSH, Port Forwarding Clarification

I'm using autossh and set it up like shown in the following example: http://surniaulula.com/2012/12/10/autossh-startup-script-for-multiple-tunnels/ I found it works really well, but need some ...
4
votes
1answer
22 views

Save SSH key passphrase using keychain with --noask option

I want to use keychain to manage passphrase prompt for SSH keys, but it should 1) ask it only when I'm actually using key and 2) save it for some period of time after that. Currently I've 2 options: ...
3
votes
1answer
894 views

How to enable systemd user sessions for remote logins on CentOS 7?

I am trying to enable systemd user sessions on my CentOS 7 server. All the pieces seem to be there, and I have also run loginctl enable-linger <user>, but I don't have a systemd user session (or ...
0
votes
2answers
22 views

Why are there 2 different fingerprints for ssh depending on what network I connect from?

When I connect to my computer over ssh on the local network, putty fives me the correct fingerprint of ssh-rsa 2048 ad:e3:4c:e3:d0:6f:81:2e:05:94:77:6c:0f:2c:a8:7f This matches the fingerprint on ...
4
votes
1answer
1k views

Directx application using wine over ssh -x

I'm trying to run a Windows app (Artemis video game - server mode) on my archlinux server. As it is an windows application I have to run it using Wine. As I'd like to be able to launch the server ...
0
votes
4answers
2k views

Script SFTP with password - HP-UX

I would like create a script in HP-UX to send in sftp with password. I have this command sftp -o PasswordAuthentication= but if I answer yes or no after, I have this issue "Host key verification ...
7
votes
4answers
673 views

OpenSSH - map aliases in ~/.ssh/config to IP addresses in command line

Is it possible to query ~/.ssh/config in the command line? Let's say I would like to retrieve what IP address does the particular alias point to in a separate program, is it possible?
0
votes
0answers
42 views

add multiple users to multiple servers [duplicate]

I have a quick bash scripting question. I'm trying to add multiple new user accounts to multiple RedHat servers in my environment. This the script I've come up with so far, but it's not quite ...
2
votes
5answers
8k views

how to find out the ip of an ssh HostName

Is there a simple way to retrieve the IP of a HostName from an ssh config on the command line? Many times I have to use scp and would like to connect to a machine, but I remember only the HostName.
17
votes
7answers
4k views

How to copy a file that is still being written over ssh?

Here is the situation: I am uploading a large file from client A to a server using sftp. I also need to download this file from the server to client B over ssh. What I would like to do is start ...
1
vote
1answer
99 views

tail file from remote server and nslookup on local

I need a script for resolve hosts. For now I run this script on local machine for i in `tail -F access.log | awk '{print $8}' | awk '{gsub("http://|/.*","")}2' | awk '{gsub("http://|:.*","")}1' | ...
80
votes
19answers
134k views

SSH tunneling error: “channel 1: open failed: administratively prohibited: open failed”

When I open this ssh tunnel: ssh -nXNT -p 22 localhost -L 0.0.0.0:8984:remote:8983 I get this error when trying to access the HTTP server running on localhost:8984: channel 1: open failed: ...
4
votes
1answer
76 views

How can I know which IP address of a host is reachable from another?

I don't particularly need a "solution" to something, I'd just like to understand more of the landscape here. So on my CentOS box, I installed a CentOS VM specifically for learning Puppet. When the ...
0
votes
1answer
60 views

How to run a program from a server on a file stored on a local machine

I have a C file stored on my machine that I wish to execute using a program on an external server. The reason that for doing this is space requirements - I don't have storage space on the external ...
0
votes
1answer
39 views

Capture stdout from ssh session to local machine

I am having to put together a script that will ssh into devices to run a command such as "show running-config" and save the output to a file on my local machine. I have done similar tasks like this ...