ssh

How to save the ssh commands history to a file

How to save the ssh commands history to a file I’m going to allow a server administrator freelancer to access my server to do some tasks for me, so I want to save all the SSH commands that will be used in a file so I can access this file later and make sure that …

Total answers: 1

Two ssh output as awk input

Two ssh output as awk input I have two remote servers that I am trying to ssh and cat some files.. I want to input the output of the ssh to a awk command. This is what I have got ssh username@host1 “cat /tmp/test/*” ssh username@host2 “cat /tmp/test/*” | awk ‘ command ‘ But this …

Total answers: 3

Cannot connect to raspberry pi via ssh – hanged

Cannot connect to raspberry pi via ssh – hanged When I try to ssh into one of my rpis (let’s call it .7) with verbose I get the following output ssh pi@192.168.1.7 -v OpenSSH_8.9p1 Ubuntu-3ubuntu0.4, OpenSSL 3.0.2 15 Mar 2022 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files debug1: …

Total answers: 1

Upload a file with SSH and then give back the control to the user

Upload a file with SSH and then give back the control to the user I’m trying to create a script that, when you connect on a remote server with SSH, the script checks things and deploy your personals scripts before giving you back the stdin, all in one SSH connection (else you have to authenticate …

Total answers: 1

Bricked ssh port

Bricked ssh port Soo I was playing with firewalld on my ubuntu server instance (Oracle Cloud) and I forgot to add rule for ssh Port so I can’t connect to it I tried using serial console becouse OCI lets you connect to it from their website, but it asked for a password, except I don’t …

Total answers: 1

SSH session termination on script error when sourcing multiple sub-scripts

SSH session termination on script error when sourcing multiple sub-scripts I’m facing an issue with SSH on a server. Running individual scripts (source s01.sh, etc.) works fine, with errors displayed in the console. However, when using a master script to source these scripts, the SSH connection unexpectedly terminates upon encountering an error. The master script …

Total answers: 1

Pass ssh remote command from bash to zsh

Pass ssh remote command from bash to zsh I am running a remote putty session from windows to my Red Hat Enterprise Linux server. Due to company restrictions, I am unable to change my Linux user’s default shell from bash to zsh. I instead have read only access to ~./bash_profile, which executes ~/.bashrc (where I …

Total answers: 1

sshd: Authentication refused: bad ownership or modes for directory /data

sshd: Authentication refused: bad ownership or modes for directory /data I’m trying ssh-ing into a rooted Android phone, but it gives me an error Permission denied (publickey)., and the log says Authentication refused: bad ownership or modes for directory, despite of the fact I have configured the permissions and ownerships carefully and correctly as shown …

Total answers: 1

What can I determine about my public key on host server?

What can I determine about my public key on host server? The administrators at sftp.foobar.com have done the following: Acknowledged receipt of my public key. (id_rsa.pub) Given me a hostname of their server (sftp.foobar.com) Given me a userid for an ssh/sftp connection (foo_user1) Here’s my .ssh/config entry Host foobar identityfile id_rsa hostname sftp.foobar.com user foo_user1 …

Total answers: 1

SSH Chroot problems

SSH Chroot problems Having multiple issues with a Chroot im trying to setup. When logging in, the users name shows up as "I have no name!". The etc/passwd file is present and accessible by the chroot user, along with nsswitch.conf. The backspace key works at removing a character, but shows up in the terminal as …

Total answers: 1

SSH by LDAP groups – not work

SSH by LDAP groups – not work There are "31" servers configured from the same RedOS image (CentOS 7-based). They are entered into the LDAP samba domain, and are configured for authorization via ssh based on ldap user groups. For this purpose the following have been changed: created as root echo "Domain admins" > /etc/ssh/access_groups.conf …

Total answers: 2

How to tunnel to host using ssh config?

How to tunnel to host using ssh config? Command I’m using to tunnel: ssh -L port:url:port username@hostname Can I define this in my ssh config? something like this pseudo code: host web user url hostname externalPort destinationPort tunnel yes Asked By: Nickotine || Source Yes, that can be done. For exaple: Host web User user_on_web …

Total answers: 1

How do I kill cvlc while watching a stream?

How do I kill cvlc while watching a stream? I am watching a stream by using the command cvlc v4l2:///dev/video0 on an Ubuntu device with a webcam. How do I exit? I’ve tried Ctrl+C, q, :q, etc, and the stream does not quit. Currently I’ve just been closing the terminal session and reconnecting. All of …

Total answers: 1

Executing sudo commands keep asking password although i've set visudo

Executing sudo commands keep asking password although i've set visudo I’m configuring remote deployment using rsync over ssh and there is need to execute a sudo command without password. This is my visudo: # Allow user to execute specified commands without password Cmnd_Alias USER_SERVICES = /bin/systemctl reload nginx, /usr/sbin/nginx -t [user] ALL=(ALL) NOPASSWD:USER_SERVICES With this …

Total answers: 1

Why Ubuntu sets system's hostname for my public IP?

Why Ubuntu sets system's hostname for my public IP? In various network utilities, Ubuntu 18.04 displays my public IP address with the system hostname. Let’s imagine that 12.34.56.78 is my public IP and 9.8.7.6 is some client’s IP. For example, if I look at the list of connected ssh-clients, I see the following: Variant 1: …

Total answers: 1

How to "source ~/.bashrc" automatically when connect to remote

How to "source ~/.bashrc" automatically when connect to remote I need to create some aliases on remote Ubuntu and enable them on ssh-connection. So I defined aliases in ~/.bashrc file (on that remote Ubuntu). Now when I do ssh root@<Remote IP> source ~/.bashrc I can use those aliases… But instead of do source ~/.bashrc manually …

Total answers: 1