Questions tagged [authorized-keys]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
38 views

Does ssh-keygen have a command to change the setting on a public key?

Does ssh-keygen have an option for setting the values like force-command, no-port-forwarding, no-agent-forwarding on a supplied key? I am thinking of the instance, when someone sends you their public ...
user avatar
  • 731
1 vote
0 answers
2k views

ssh authorized_keys file location and permissions

I am confused on the permissions that ssh requires when dealing with custom authorized_keys files. For example, assuming that we have a server the following line in file /etc/ssh/sshd_config: ...
user avatar
  • 11
0 votes
1 answer
80 views

How can i switch to root from ad login to send ssh keys to /root/.ssh/authorized-keys

I am trying to send ssh keys to multiple servers from jump server using shell script. I can only login from my ad account and then switch to root and cannot login directly as root. Having this ...
user avatar
  • 1
3 votes
1 answer
484 views

Locking and Unlocking SSH Keys after an amount of time

I am trying to have a SSH generated key, where you need to unlock it with a password and then you can login on the server the whole day without password. But when the day is over, the key should get ...
user avatar
0 votes
1 answer
53 views

Use one ssh public key for multiple remote users

I have my one local public key and I am trying to add it to two authorized_keys on a remote server for two different users (ex. users remote1 and remote1). I am able to ssh just fine as remote1; ...
user avatar
  • 1
1 vote
0 answers
56 views

How to authorize a key to sftp only, and only to a subdirectory?

I need to allow sftp-only access to an account on a machine, where I do not have root, so that a remote user can upload (put) files to a subdirectory, and nothing else. Not having root-access prevents ...
user avatar
11 votes
1 answer
1k views

How can I use ssh to cat to a file in a remote Linux directory if the directory doesn't exist yet?

I'm trying to send the public id_rsa.pub file from my Mac to the ~/.ssh/authorized_keys directory in my home directory at Linux servers so I can then access without logging in each time. From my Mac ...
user avatar
1 vote
0 answers
2k views

OpenSSH resetting connection when I try to SSH

I'm trying to set up my local Windows 7 machine to receive SSH connections so I tried to follow this guide on how to install OpenSSH into a Windows machine to server as an SSH server. I was able to ...
user avatar
  • 113
2 votes
1 answer
176 views

SSH server checking public keys from another source

In an ssh connection with key authentication the user sends the ID of the public key he wants to use. Then, the server checks the authorized_keys file for the publick key. I'd like the server to not ...
user avatar
1 vote
1 answer
370 views

Why does my tar via ssh (command via authorized_keys) corrupt the archive?

From a backup-machine I want to pull tgz dumps of a production server. Both machines run ubuntu 16.04. Therefore, the backup-server connects via ssh and a specific ssh to to the production server. ...
user avatar
  • 150
0 votes
1 answer
64 views

Using SSH authorized keys to roll out privileged file update across a LAN?

I've got a server that from time to time automatically updates a set of privileged files (eg, certificate keys, configs etc). It needs to save those files on other systems on the LAN. I know roughly ...
user avatar
  • 1,505
0 votes
0 answers
205 views

Linux: How to setup authorized_keys so can log in as different user

local user ID: GregD remote user ID: GregTD I know how to setup authorized_keys so I can log in as GregD. but I need to connect to a server as GregTD, and despite having added my authorized_keys to ....
user avatar
1 vote
1 answer
148 views

How to setup private key ssh connection? [closed]

Lets say that to login to a remote address instead of a ssh login and password I have received rsa private and public keys. Is it safe to use it and how should I add them to the .ssh folder? manually ...
user avatar
  • 121
6 votes
1 answer
8k views

SSH: Effects of no-pty login option in authorized_keys

I'm confused by the behavior of restrict or no-pty login options prepended to a key in ~/.ssh/authorized_keys. For a given key I was intending to prevent any interaction except for starting an SSH ...
user avatar
  • 771
1 vote
1 answer
2k views

OpenSSH "from" Authorization Option Working Only With IP Addresses, not Hostnames

I am using OpenSSH 6.7p1 on Debian 8 (Jessie). I am using public key authentication. As part of that, I am using the "from" authorization option in my authorized_keys file. I am finding that when I ...
user avatar
  • 839
0 votes
1 answer
1k views

Importing Multiple key in the authorized_keys for same host

I am setting up a SSH password less connection setup for two server for the first time. I have imported a public key earlier by vi to authorized_keys, but since this was failing so i have asked ...
user avatar
1 vote
1 answer
71 views

Is it possible to acquire an SSH authorized RSA private key just by having access to the server? [closed]

Is it possible to get hold of an RSA private key (pem file) simply by having (root) access to a server that authorizes ssh access using that that private key. For example, can the entries in .ssh/...
user avatar
  • 466
0 votes
2 answers
6k views

SSH authorized_keys and newline

I am trying to configure SSH with public-key authentication on Debian. I can't seem to get it to work because auth.log keeps saying that can't read key type:...(key line)\n. It keeps complaining ...
user avatar
2 votes
2 answers
284 views

Strange behavior on SSH public key login

I'm really stuck here. I've been trying to ssh into my ec2 server from local with a public key but it is not working. -> I get permission Denied (public key). The set up is as follows: Local: ...
user avatar
  • 21
3 votes
3 answers
8k views

Why is SSH not honoring my authorized keys?

I have 2 laptops at home, both running Ubuntu 12.04 (Desktop), and both using the same NetGear wifi router. I used a technique called "MAC binding" on one of the machines so that the router always ...
user avatar
  • 2,682
0 votes
3 answers
4k views

Limiting SSH to SFTP only?

I use SSH keys to allow passwordless logons to my box. I want to limit them to SFTP only. I have the following in my authorized_keys file which appears to work: command="internal-sftp" ssh-rsa ... ...
user avatar
  • 1,153
1 vote
1 answer
691 views

using sftp and having www file access at the same time

Im getting confused about permissions and sftp access in ubuntu. I have a user who has access to the www folder : <username>:www-data I have set the following in sshd_config: Subsystem sftp ...
user avatar
  • 333
2 votes
5 answers
16k views

Scripting an 'empty' password in /etc/shadow

I've written a script to add CVS and SVN users on a Linux server (Slackware 14.0). This script creates the user if necessary, and either copies the user's SSH key from an existing shell account or ...
user avatar
  • 1,169
-1 votes
1 answer
191 views

automate SFTP process with different ssh version

I am totally new to this. Please bear with me if my question is totally nuts. I am trying to setup rsa keys between two servers. I tried the following steps. ssh-keygen -t rsa copied the id_rsa.pub ...
user avatar
0 votes
1 answer
713 views

Authorized keys only from external IP, but passwords allowed internally

I just set up my sshd_config to only accept authorized key instead of passwords to help secure my network. Is it possible to make this restriction only apply to external IPs and allow me to still use ...
user avatar
  • 7,028
1 vote
1 answer
340 views

SSH ForcedCommand causes connection to close

I'm SSHing a server (I'm on cygwin using openSSH), and I went into authorized_keys and modified the file as follows: ssh-rsa [key] to command="echo Working" ssh-rsa [key] Now when I connect to the ...
user avatar
5 votes
5 answers
5k views

SSH without password doesn't work with user postgres

I've tried manually adding the pub key to authorized_keys and authorized_keys2. I've also double checked the permissions on .ssh (700) and authorized_keys (644). I can login without password on the ...
user avatar
4 votes
3 answers
8k views

ssh-copy-id and duplicates in authorized_keys

I want to type password only once when connecting to SSH so I use ssh-copy-id and install my pubkey into authorized keys. But I don't keep track which servers already have my key and which does not, ...
user avatar
  • 15.9k