Questions tagged [ssh]

GENERAL SSH SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com. Secure Shell (SSH) is a cryptographic network protocol for secure data communication. Use this tag for programming questions related to Secure Shell. Common authentication and configuration problems are off-topic for Stack Overflow.

2
votes
0answers
13 views

Is there a way to restrict a ssh key/user from accessing some part of the repo?

I have a container running which is pulling a repository into its system. But I want to restrict its access to only one folder of that repository. Say I have a repository my_code with two folders ...
1
vote
1answer
39 views

how to connect to a server via SFTP using python?

I am trying to connect to a server via secure SFTP in Python but I keep getting authentication errors. I'm sure I have the right details as I can connect via WinSCP fine: I have also viewed the ...
0
votes
0answers
9 views

Requests through SSH tunnel aren't reaching remote port

I have a server in my home running an SSH server, and I'd like to tunnel traffic from one of its hidden ports to a port on my local machine. I've enabled GatewayPorts yes on the server and restarted ...
0
votes
1answer
11 views

ssh-add “Error connecting to agent: Connection refused”

My MacBook rebooted and when it does that I have to typically add my private key via ssh-add, using the following command $ssh-add ~/.ssh/id_rsa And I never have any issues, Today I am getting this ...
2
votes
1answer
40 views

Using encrypted password to SSH to multiple servers using Plink

My batch file code requires to run some shell commands on multiple servers using SSH. For that I'm using Plink from a for loop. I do not want to enter the password in plain text to the Plink command ...
1
vote
1answer
21 views

Ssh with JSch to a remote machine that asks twice for username and password

I am just doing ssh [email protected] to a remote machine, where I can't understand what is happening. This command again asks for username and password twice like this: $ ssh [email protected] username : me2 ...
0
votes
0answers
19 views

SSH user (not root) cannot login by pubkey

sshd.configt PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys2 userfile drwx------ myadmin myadmin 4096 Jun 26 14:51 /home/myadmin/.ssh -rw------- myadmin myadmin 779 /home/...
0
votes
0answers
12 views

screen get squeezed after pexpect ssh to remote server

I'm using pexpect to a remote server and handover screen to me. the script run success. only problem is that the screen output kind of get squeezed after login using pexpect. it's like not getting a ...
-1
votes
3answers
39 views

Adding github SSH key to my desktop, yet, it asking password and username

I heard if I setup SSH key in GitHub, then in future git commands will not ask me to enter password and username. How I did it? At first I generate SSH key Then paste the key on github SSH key ...
0
votes
0answers
11 views

What Is The Proper Way To Use SSH Commands In Chilkat

I am using chilkats others libraries like HTTP, FTP, JSON etc etc. but i am not very good at SSH, so currently using SSH through putty (plink) for automation. but using system.diagnostic.process to ...
0
votes
1answer
19 views

Github multiple repositories defaulting to old username

I have all the settings configured in a way that appears correct, but git is still defaulting to an incorrect username. I have the following set in git config: alias.hist=log --pretty=format:"%h %...
-1
votes
0answers
15 views

How to search for pattern in text file present in remote server using python paramiko?

Established SSH to remote server using python paramiko. I need to search a pattern in a text file present in the remote server. def LoginToServer () : self = paramiko.SSHClient() self....
-1
votes
0answers
11 views

paramiko.ssh_exception.ChannelException: (1, 'Administratively prohibited') , why is this being raised and what does it mean?

I've been trying to debugg this for several hours now and I still don't know why this is doing this. In this code, I'm connecting to a switch using SSH using python's paramiko library. I have written ...
0
votes
1answer
17 views

What's the safest way to store private keys in Android applications that open SSH connections?

I'm writing an app which is supposed to access my private server via SSH using JSch. Since I have set up public key authentication I want this app to authenticate the same way. I will be the only one ...
0
votes
0answers
9 views

Rsync files created last hour over ssh in sh script

The code under is working. Need advice how to add mtime in the script rsync -a [email protected]:/mnt/user/folder/files/ /home/newsource/files
1
vote
2answers
22 views

Copy files or clone via ssh in Dockerfile when building docker image

I have been trying for a while to copy files via ssh from a remote server (not gihub) inside the docker image I want to build, but I can't connect to host. Here is the Dockerfile up until the critical ...
0
votes
0answers
11 views

Connect to SFTP trough PL/SH postgresql function

I am trying to connect to a sftp to copy some files in a postgres function. i am using the plsh extension to write bash commands directly in the function. I want to use the scp command, but while all ...
0
votes
0answers
14 views

Keep SSH session alive when IP changes

PROBLEM: I have an AWS EC2 Ubuntu 16.04 machine set up to change IP every 5 minutes. I need to work via SSH on it, but this is obviously hard as the terminal console freezes and then I have to ...
0
votes
1answer
30 views

python subuprocess: 'ssh' is not recognized as an internal or external command, operable program or batch file

I can run ssh -R 80:localhost:5000 serveo.net command in cmd without any problem, but when i try to run it through Python, it shows me this error: 'ssh' is not recognized as an internal or external ...
1
vote
1answer
24 views

SSHpass : to access local variable on remote host

Unable to access local variable on remote host using sshpass. Can you please help me to pass local variable to pass on remote host using ssh pass for the below code snippet name="Stack over flow" ...
-1
votes
0answers
18 views

How to execute a command automatically after SSH exit? [on hold]

My steps: Login on Server-A Remote login to Server-B on Server-A using ssh command Execute the command "exit" on Server-B to exit Now it is back to Server-A, how can it execute a command on Server-A ...
-1
votes
0answers
15 views

How do I store other people's ssh keys securely?

This is not really a programming question, but please hear me out. I am building a deployment tool, So using my application others can deploy their own application to their own servers. (just like ...
3
votes
1answer
40 views

Why does reading from a shell channel output in JSch never end with -1?

I created an object called Obj which sends messages over a Secure Shell channel. I can send characters in UTF-8, which means that the output stream must handle multi-byte characters. That is why I ...
0
votes
1answer
39 views

Shared Hosting SSH (rsync enabled) to Google Cloud Storage

I am looking to share/sync a folder on my shared web hosting to a bucket I have created in Google Cloud Storage. My host has enabled both SSH and rsync on my shared hosting. unfortunately, I cannot ...
0
votes
1answer
27 views

Git Submodule [email protected]: Permission denied (publickey) error

When I run git submodule add -f [email protected]:VundleVim/Vundle.vim.git .vim/bundle/Vundle.vim this happens Cloning into '/home/ridhwaans/dotfiles/.vim/bundle/Vundle.vim'... [email protected]: ...
0
votes
1answer
37 views

Git asking SSH key password

I'm using Git to clone my repository from Github. I'm using HTTPS to clone it. Everytime I cd to the repository, or every command I do, the terminal asks me my SSH key password. This is strange, ...
0
votes
0answers
21 views

Executing python autogui script on ssh remote executes commands on ssh host

I am trying to execute my python script over ssh on my Pi. I have setup my Priv/Pub Keys and execute them by using a python script on my host machine: subprocess.run('ssh -p 2222 [email protected]<IP_of_Pi>...
0
votes
0answers
38 views

kubespary:ansible can't send data with ssh to a node in ansible-playbook command

in step 10 of tutorial https://dzone.com/articles/kubespray-10-simple-steps-for-installing-a-product for deploying a production ready kubernetes cluster with kubespray, an error occured when running ...
0
votes
0answers
18 views

Loading RFC4716 SSH keys with Python

I'm trying to open key in SSH2 format - beginning with: -----BEGIN OPENSSH PRIVATE KEY----- With pycryptodome. It dosen't work. >>> from Crypto.PublicKey import RSA >>> k = open('...
-1
votes
1answer
23 views

rsync error (code 12) at io.c(226) [sender=3.1.3] on Mac OS

I'm trying to do a rsync network copy. I'm using homebrew's latest version of rsync. Both source and dest terminals show: $ which rsync /usr/local/bin/rsync $ rsync --version rsync version 3.1.3 ...
-1
votes
0answers
20 views

Facing issue while connecting to ec2 instance using chrome secure shell extension

Windows 10 - chrome browser - secure shell extension. Facing issue while connecting to an EC2 instance using chrome secure shell extension. Connecting to [email protected]
0
votes
1answer
39 views

Git and Bitbucket: unauthorized when pushing

I have created a repository in BitBucket and have cloned it using SSH. When attempting to push my changes to BitBucket, I receive the following error: Unauthorized fatal: Could not read from ...
-1
votes
1answer
28 views

SSH with VSCode without internet

Is there a way to connect without the internet? download vscode server files from another system and copy to host? i read this but i cant connect server to internet,They do not let me do this.
1
vote
1answer
40 views

Does Paramiko reuse a session or open a new one for each exec_command call?

I have a number of devices I need to test. To do so I need to execute commands over an SSH. I'm using Python and Paramiko. Here is the question. Every time I am running a command over SSH, does ...
0
votes
1answer
24 views

Error: Host Key verification failed, while deploying via SSH and Gitlab CI

So I'm trying to setup CI/CD using GitLab to deploy my web application to DigitalOcean Droplet using SSH. The problem I'm facing is that, GitLab script is unable to ssh to the server..whereas if I ...
-1
votes
1answer
6 views

How can I obtain the known_hosts formatted public key value for ec2 instance ssh-key?

AWS outputs this key line 2048 SHA256:2p2o3eIz/XxxX6IIegXx5FkHo3Lap7xR+Ue2qJ0zV4w [email protected]****** (RSA) to the system log. How can I replicate this format for the ssh-rsa key from the command line? I ...
-1
votes
1answer
54 views

how to properly close ssh connection / session here?

I have a client/server socket program. Server part is connecting via ssh to a host, runs a script, and sends each line of the output to the client. The below server code part returns a BufferedReader ...
-1
votes
0answers
14 views

SSH terribly slow over VPN

I've setup my Mac machine for work to be able to SSH into my BitBucket repository and have successfully been able to clone a repository. I however have to use a VPN when working from home (using ...
-3
votes
0answers
18 views

Issue with SSH-copy-id -i on UBUNTU 18.04 [on hold]

after completing ssh-keygen command, when i tried to run the command ssh-copy-id -i [email protected] , I am getting as below: /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/...
-1
votes
1answer
19 views

Jenkins ssh why it shows this error com.jcraft.jsch.JSchException: channel is not opened?

I know I posted a question that was bogging me for days but found a solution for it just 5 minutes after posting so I am posting about this problem that I get ever since 2 hours, anyway, I have a job ...
-1
votes
0answers
12 views

Running multiple ssh commands in airflow using SSHoperator

I wonder if there is some way I can run multiple ssh commands as multiple jobs (with dependencies) using only one SSH operator. For example , say there are 3 ssh commands : s1 , s2 , s3. Now there is ...
0
votes
1answer
16 views

insert sql record by command line ssh

i try to execute this command line: ssh [email protected] "mysql -u login -ppassword zabbix -e 'INSERT INTO worldmap_latlng (lat,lng,name,value,timestamp) VALUES (48.891198, 2.2465829, "'test'", 0, now())'"...
0
votes
0answers
22 views

Prompting again for password even after copying public key from server to client

I have rundeck server.I have copied rundeck server public key to other clients using "ssh-copy-id". There are 20 clients. Authentication works for most of the clients. But not for few.Those few ...
0
votes
1answer
22 views

Bash script function wrapper for remote execution of SSH commands

I am trying to create a SSH Bash wrapper function that will allow me to execute commands remotely. The goal is to have a function name and parameters that are passed to the function without worry of ...
-1
votes
0answers
21 views

TestComplete Jenkins Plugin - TestComplete did not launch it

I tried running my windows Jenkins agent with Local System User and I am facing this error Can someone help me with this please Also, I would like to launch my Jenkins slave via SSH and execute the ...
-1
votes
0answers
15 views
+50

SSH 2FA not working with Google Authenticator

Ssh with 2FA using Google Authenticator worked well for many months. My cellphone broke and I had to use the backup codes. All backup codes were used. I fixed the phone, I'm able to use the Google ...
-1
votes
1answer
14 views

What exists in the .ssh directory when you create it?

I'm working on setting up an SSH key on a VM. I needed to create a .ssh directory at the root: mkdir .ssh. Right away, the directory has contents: drwxr-xr-x. 2 myusername folder 6 Jun 20 19:51 ....
0
votes
0answers
8 views

Connect to mariadb via SSH with Python

I try to connect to mariadb via SSH. Unlike similar issues I found on the Internet, in my case nothing happens (not even an error message). The system can easily connect to the server SSH, and seems ...
-4
votes
0answers
51 views

What is the way to implement a crossplatform SSH server in golang [on hold]

I am trying to implement an SSH server in go. The issue is that I can't find a way to be crossplatform ... The /bin/bash shell drop successfully on macos and I can interact with it. But on windows and ...
-1
votes
0answers
16 views

ERROR : Permission denied at the “Confirm Hosts” step

I am trying to setup a multi-node cluster using Ambari with 6 hosts created with Scaleway.com. I use Hdp 3.0.1 with Ambari 2.7.3.0. I already did the steps described in the hortonworks Docs. The ...