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

learn more… | top users | synonyms

3
votes
1answer
29 views

How to limit connections to OpenSSH server to using private keys necessarily with passphrase?

Is there any way to configure OpenSSH (/etc/ssh/sshd_config) server to allow private keys necessarily with passphrase?
0
votes
1answer
37 views

How to forbid ssh connection after sudo -u

After ssh login, user with UserName makes $ sudo -u localusername -i and $ ssh localusername@someserver How to forbid ssh localusername@someserver for UserName via sudo -u localusername but permit it ...
1
vote
1answer
36 views

How to rsync files between two remotes with an explicit port and different usernames?

I want to rsync files between two remote servers. I tried to follow the next solution of @roaima: http://unix.stackexchange.com/a/183516/137526, but I need a more delicate solution, for two reasons: ...
1
vote
0answers
24 views

Raspbian Jessie Lite “Factory Reset”

I am currently remoting offsite to my Raspberry and since I think I messed up all packages and configuration files I would like to return to default settings before installing all the packages and ...
1
vote
2answers
48 views

SSH connection to specific server refused

I have an ubuntu Server in Digitalocean. Normally, I can connect this machine with SSH but while I'm connected to my school network, when I wrote ssh root@IP , it freezes and never even ask my ...
2
votes
2answers
72 views

Combine Two SSH Commands

The first ssh command is done on my computer, I enter the key password, then put the second ssh command in while logged into the server. ssh -i cloudkey -L 6000:localhost:6001 admin@54.152.188.55 -p ...
3
votes
1answer
99 views

Syntax error with variable containing quotes

I have a bunch of Linux machines behind 2 gateways. To connect to set one I do ssh -o ProxyCommand="ssh gateway1 nc %h %p" machines_behind_1 ssh -o ProxyCommand="ssh gateway2 nc --proxy %h %p ...
0
votes
1answer
32 views

User “read” command while executing remote scripts over ssh

Let me explain my situation first. I have an alias in .bashrc: doscript () { ssh root@server$1 -p2202 "bash -s" < ~/scripts/$2 $3; } I have a script, that basically consists of several actions ...
12
votes
2answers
25k views

Meaning of “Connection closed by xxx [preauth]” in sshd logs

We have a Windows batch script, which connects automatically to a linux server via PLINK (putty). There is NO public private key authentication, the user and the password are in the script. On our ...
7
votes
2answers
3k views

working with filenames in a different encoding over ssh

I'm ssh'ing to a remote system where a different encoding for the filenames (and for the users' locales) has been used. And this causes some problems. Problems solved by matching the locale settings ...
1
vote
2answers
556 views

How do you keep the password hidden when invoked during the su command?

This is the first time it has happened to me where I am using the su command and it actually displays the password on the terminal and doesn't stay hidden. Here is my code snippet: sshpass -p ...
2
votes
3answers
2k views

how to execute commands on remote server as different user

I am trying to connect to server B from server A using ssh and executing commands using some other user. However, when I try searching for a pattern in log file it says "cannot open log file" below is ...
4
votes
3answers
8k views

How can I scp a file that my user can't read but I can sudo?

Can I use scp to copy a file from a remote server which my login user can't read, but where I have permission to sudo to root (without password even)? How?
1
vote
1answer
36 views

X11 forwarding via SSH and su

For me, it is weird that while using ssh connection with X11 forwarding, a user and root are able to see xclock, but another user is not able to see that. Why? mahmood@cluster:~$ xclock ^C ...
2
votes
1answer
37 views

Why are some pts in AIX never reused?

In an AIX system (AIX p740 1 7) that is running for about several months, some pts aren't reused anymore. This was noticed using the "who" command, with the following "awk" expression, running it ...
1
vote
1answer
1k views

SSH: Permission denied, please try again

I need to connect to a server and don't know whats going on: me@pc:~$ ssh -v server OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /home/me/.ssh/config debug1: ...
3
votes
2answers
1k views

SSH Agent Forwarding on server

I'm struggling with the concept of SSH Agent Forwarding. This is what I've done so far: Create default identity local (ssh-keygen) Install the public key on bitbucket Now I want to connect to a ...
1
vote
1answer
27 views

change home folder permissions on exit/disconnect

I have a use case where my folder on the linux server needs to have its permissions opened up so I can use a sudo account to move files from my folder to shared folders. What then happens is often ...
-3
votes
0answers
38 views

Connection Immediately Closes after entering password when SSH into remote host/server

I've read through a lot of the other threads on this but the log from running the verbose command doesn't seem to match what other posts have said. azhu-mb15:~ Azhu$ ssh -v Azhu@flynn.ttr01.com ...
0
votes
1answer
13 views

remote connection config in terminator

I'm using terminator and would like it to start up pre-configured with remote connections established, I do achieve this by setting ssh user@host in the command = field in ~/.config/terminator/config ...
17
votes
6answers
3k 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 ...
0
votes
1answer
20 views

Socat not cleaning up cleanly after itself via ssh

I am trying to talk to a machine that is connected to my local machine, using ssh, socat, and another utility I made. On source machine I am doing: ssh root@localhost -p 2004 'socat -u ...
3
votes
1answer
15 views

How do I make GPG use keys accessed over SSH?

I have my GPG keys stored on a remote server (accessible via SSH) due to some technical constraints. Is it possible to make GPG use those keys transferred over ssh, without actually copying them ...
0
votes
1answer
48 views

PuTTY (SSH) (tracert) Network error: Software caused connection abort

EDITED: SOLUTION FOUND: After contacting godaddy, a solution was found very fast (great service!). What seemed to be the problem was that my IP Address was being blocked, given that I had too many ...
0
votes
1answer
46 views

I have to restart sshd every time I reboot

I have an arch machine that I use as a local server. It used to be that every time I rebooted it (which was not often), I had to login and enter # dhcpcd net0. After that, I could ssh into it from my ...
5
votes
3answers
359 views

How to recursively uncompress gz files on a remote host with limited commands?

I have a bunch of .jpg.gz files in a directory that I need to decompress. I know that the decompress command is: tar -xzvf FileNameHere.jpg.gz But is there a flag that you can recursively ...
26
votes
3answers
1k views

Do programs run from an ssh session depend on the connection?

Does a program that is run from an ssh session depend on the connection to the client? For example when the connection is really slow. So does it actively wait until things are printed on the screen? ...
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 ...
0
votes
0answers
33 views

Cannot ssh into server through VPN

I'm trying to ssh into my university server via vpn (PPTP). I'm on an Mac OSX 10.11.4. (El capitan) Unfortunately, I get the following error: Adams-MacBook-Pro:~ adamG$ ssh gadam@xxx.xx.xx.ac.uk ...
0
votes
1answer
879 views

ssh secure shell: “connection closed by remote host”, not acquiring the key

I am very new to using this ssh secure shell to access a remote workstation. This is the third time I have received the message: Server responded "Connection closed by remote host". The ...
0
votes
2answers
55 views

Server refused public-key signature despite accepting key - putty

I used puttygen to generate both my public and private key files (ssh2, 2048 bit). I have set up the settings in putty correctly and it is using the correct private key file. As for the public key, (I ...
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 ...
5
votes
3answers
1k views

How are terminal length and width forwarded over SSH and telnet?

When I view the length and width of my terminal emulator with stty size then it is 271 characters long and 71 lines tall. When I log into another server over SSH and execute stty size, then it is also ...
5
votes
3answers
3k views

Transferring Files SSH SCP Error Message: 'Stdin: is not a tty'

I am using a Macbook SSH terminal and generated RSA key pairs and uploaded remote id_rsa.pub with approved permissions. I can connect with remote Apache web server. I can create, open, move, modify ...
0
votes
1answer
1k views

non root ssh keys help

I'm having issues setting up a different CentOS account with its own pair of SSH keys. I have created the required files but when connecting with Putty it says Connection refused, here's the putty ...
2
votes
1answer
170 views

SSH refused after updating from wheezy to jessie

I have a Raspberry Pi Model B and I updated it this afternoon from wheezy to jessie. I connect headlessly with VNC and SSH (usually the latter) because I play around with home LAMP and nodeJS servers. ...
-2
votes
2answers
70 views

How can I repeat a Linux command every minute? [duplicate]

I'd like to get a Linux command which runs in the background and writes something to the terminal screen every one minute. I am trying to keep ssh session alive, I am using Cygwin for connection to ...
6
votes
3answers
5k views

A Web ssh/telnet client

I'm in kind of a tight spot right now. I wanted to know if someone has seen a HTML, or PHP web ssh client as both my company and school block everything besides port 80. I'm a control freak when it ...
0
votes
0answers
15 views

BindAddress in ssh config on laptop

I have a section in my ~/.ssh/config for connecting to a server via IPv6. But as I have enabled privacy extensions for IPv6 and to avoid my ssh connections being cut I've added BinAddress to that ...
2
votes
1answer
21 views

Extract SSH server key from server itself

In order to connect to an SSH server, it must be listed in known_hosts. Is there some command that I can run on the server which will generate the text that needs to be put into this file? (Surely ...
0
votes
4answers
958 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
1answer
137 views

Why won't MOTD display output from a Python script it calls outside of /etc/update-motd.d/ unless it's in this directory?

The Situation We're running a headless Ubuntu 14.10 Server to fulfill various needs and tests. I was experimenting with changing the MOTD for SSH sessions via /etc/update-motd.d/ so as to display ...
0
votes
2answers
57 views

How to run a shell script on 10 hosts simultaneously? [duplicate]

Currently I am monitoring 10 hosts. I want to write a script which will calculate the disk space in every 24 hours and then if the file system of a host is critical for any host then it will move the ...
0
votes
1answer
35 views

High time until SSH asks for password

I've been noting recently that any host that I ssh to in LAN, waits like 5 seconds before asking for password. ping sometimes also waits, but less(like 2 seconds), but it shows it has resolved the ...
12
votes
4answers
9k views

Run a diff between local and remote files

I'm connected on a host via ssh and I'd like to compare (let's say with diff) a certain config file against its counterpart on an another host, also accessible via ssh, without having to manually ...
0
votes
2answers
40 views

One shell script to perform commands locally and remotely

So, here's the problem. I have a file on a remote machine available only to root, and a private-key-only no-root SSH access(I do have sudo though). I need to copy that file to the local machine, and ...
0
votes
2answers
1k views

tmux with iterm2 attach a remote session

I'm using the Tmux integrating with ITerm2, which can create a tab in ITerm 2 for each window created by Tmux. But somehow this doesn't make much sense for the usual SSH scenario, where we first SSH ...
0
votes
1answer
53 views

SSH connection giving Connection refused error

I am using CentOs. I can SSH from local machine to server A. I can also SSH from local machine to server B. But I cannot SSH from server A to server B: $ ssh -p <portB> root@B root@B's ...
0
votes
0answers
40 views

how to manage stdout/stdin buffering while doing ssh using openssh?

I have an embedded system -Linux, which has openssh utility - Linux. I am trying to do ssh from first device to second device and from second device to the third device. When I am doing the second ...
2
votes
1answer
1k views

Cannot ssh into a fresh install of CentOS minimal on lan

I've downloaded CentOS 7 Minimal and installed on an old laptop. I want to be able to ssh to the machine from other machines on the same lan. But I keep getting this error .. ssh: connect to host ...