Tag Info

New answers tagged

0

You could set up another machine as the default router for your server and use that machine to generate the appropriate traffic, maybe?


0

it is very easy to spoof ip addresses for just sending one packet (DoS Attacks) but in your case you need a working TCP Session. So when you start with your first IP Test the SSH Server will answer the TCP Syn packet with a TCP ACK packet and the Testing Host will reply with a TCP SYN Ack. After that the SSH Connection wil be up (TCP three-way handshake). ...


1

See man sshd_config: AllowUsers This keyword can be followed by a list of user name patterns, separated by spaces. If specified, login is allowed only for user names that match one of the patterns. Only user names are valid; a numerical user ID is not recog‐ nized. By default, login is allowed for all users. If the ...


0

Perhaps you've forgotten to assign the user's shell? That can be done like so: useradd -s /bin/bash gdea73 It may be something different entirely, but I do recall making the aforementioned error myself at some point in the past.


0

Try this way: #!/bin/bash sudo sh /opt/scripts/runp.sh & sudo sh /opt/scripts/runt.sh & sudo sh /opt/scripts/rund.sh & ssh sut@slave sudo sh /opt/scripts/runs.sh & ssh sut@slave /home/sut/pf/server-sysfs 8989 & sudo sh /opt/scripts/runc.sh &


0

with ProxyCommand its possible - because its just a set of shell commands: Host pro-* ProxyCommand ssh production-server nc 192.168.1.`echo "%h" | perl -pe 's/pro-//'` %p


1

Why don't you make your debian computer to require only public and private keys instead of requiring for a password? You can change that setting on the sshd_config file. But before you do that you just have to generate the keys and install them on your server with ssh-copy-keys. After going through this process nobody would be able to even try to guess an ...


1

The biggest issue with public connections is the password. I don't really care if someone comes to know my username/what I did. What matters though, is how they could re-use my password. I suggest securing SSH access with two-steps authentication. I found that link explaining how to enable Google Authenticator for your SSH login: ...


0

As explained by a21 above, what happened is that firefox, rather surprisingly, in fact runs on laptop, not headless! The reasons and a solution is described here: Starting firefox on a remote host (over ssh) opens a new window locally: what is happening?


-1

chmod 0400 pemfile.pem and ssh -i path_to_pem_file -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ec2-machine name


0

Figured it out. Here is my functional script: #!/bin/bash ADMIN_PASS="$(cat /Users/adminuser/Documents/UpdateScript/enPass.txt)" ADMIN_USER="adminuser" HOST_LIST="/Users/adminuser/Desktop/hosts.txt" for HOST in $(< $HOST_LIST); do echo "" echo "--------------------------------" echo "# CONNECTING TO: $HOST #" echo ...


0

Not sure which client you are using, but for some the default settings is to forward SSH agent requests and to ignore the middle-man's key(s). Look in your documentation to disable "agent forwarding", in ssh(1) that is the -a option and the ForwardAgent configuration value.


0

Calling the subsystem with sudo worked for me. To an Ubuntu host for example: sftp -s "sudo /usr/lib/openssh/sftp-server" targethost.fqdn


0

Connecting to a machine as root user is a highly discouraged practice since it obscures who is really connecting. For example: If you look at your ssh log files, you will only see connections from one user, which makes it very difficult to track down if it is a malicious connection. You loose the ability to ask/answer questions like "Why was bob ...


2

Login by root it's not a good practice. You can configure your system to login with ssh-keys. And also disable login using password. Look at this post And if you have root privileges you can change root password. Use this commands: $ sudo -s # passwd root


0

Kind of a weird shot-in-the-dark, but make sure your IP didn't change. I had this issue once - I set a .bashrc alias alias sshdev='ssh me@123.2.3.4' as my typical way of logging in, and one day I started getting the following error: ME-M-216C:~ me$ sshdev ssh: connect to host 123.2.3.4 port 22: Connection refused We just had a power outage at work which ...


0

This video explains how to solve the error step by step. If you don't wan't to watch then follow the text below: The No protocol specified error indicates that "the user doesn't know how to launch a GUI application" and the "user doesn't have permissions to launch a GUI application". In the video the GUI application is dbca. The key piece of this video ...


0

It appears you do not have permission to open a socket on that server as implied by the -D switch... Normal ssh will work because it isn't opening a local socket for listening... A snippet from man ssh -D [bind_address:]port ... Only root can forward privileged ports. Dynamic port forwardings can also be specified in the configuration file. Looks like ...


0

I'd say that all the FTP mechanics of sessions, separate data and control connections going in opposite directions, current directories, etc would be hard and pointless to implement inside ssh. Copying could just reuse the connection and and the fact it is running a shell on the other side (which it not always does). For quick file copying, you can just ...


2

Backward Compatibility! ftp has been around in some form or other since 1971. It became the standard IP file transfer protocol in 1980. "sftp" is simply an ftp protocol that uses encryption when transmitting data over the network but is otherwise identical to the "ftp" protocol. This allows millions of existing scripts and procedures to take advantage of ...


-1

Take ssh from client side, then after run $ groupadd groupname It creates group. If you want to add members into group run below cmd $ useradd username Hope its helpful to you Regards Jaymin D


2

You could prefix the key with a forced command that tells the user what's going on. For example: command="/usr/bin/printf '*** Your key has been disabled ***\r\n'; sleep 1",no-pty,no-port-forwarding ssh-rsa AAAAB2...19Q== joe@example.net Then they get: $ ssh servername PTY allocation request failed on channel 0 Your key has been disabled Connection to ...


1

I would suggest if you have many commands to run on the remote server that you create those as a shell script that you upload once and then execute that once per the ssh command. Make sure that you have execute permissions on the script and that it doesn't rely on any information that is gained from your normal shell session, like variables or path set by ...


1

If you do ssh server the server part could be a real host name or some ssh internal "nickname". ssh first looks for some nickname in .ssh/config, if it finds a configuration there it will use this. If it does not find a configuration it assumes a real hostname and tries to resolve it via /etc/host and dns.


0

The file ~/.ssh/config has nothing to do with /etc/hosts. Rather it's a configuration file for ssh to use if it exists. You can see that ssh refers to this file prior to doing anything else by using the verbose switch, -v, to ssh. Host entry in ~/.ssh/config Here I have an entry in my ~/.ssh/configfile for a server named "skinner". I'm enabling debug ...


-2

Generally, for Unix software in general, user-specific settings (in this case, ~/.ssh/config) would override system-wide settings (in this case, /etc/hosts); thus, the settings in ~/.ssh/config would be higher priority.


0

The following permissions are needed: The .ssh folder: 700 (drwx------) The public key: 644 (-rw-r--r--) The private key: 600 (-rw-------)


0

you must ensure ssh server had configured to accept public key authentication. Then if message error said we did not send a packet, disable method meaning ssh server had some trouble to access authorized_keys file. You should check: The syntax of authorized_keys is correct. The permission of .ssh directory and authorized_keys file is correct. The good ...


1

Yes you can just put # (or any other character, as long as the initial entry e.g. ssh-rsa is no longer valid), before the relevant line. If you do that, and the system allows for plain text password logins as well, the user will be prompted for a password to login. So you might want to check that there is no (known) password associates with the account.


1

To minimize the setup you can have a .ssh/config like this one Host X01 HostName X01.YYY.com Host X02 HostName X02.YYY.com ... Host X01 X02 ... User my_username Compression yes Ciphers arcfour,blowfish-cbc Protocol 2 ControlMaster auto ControlPath ~/.ssh/%r@%h:%p IdentityFile ~/.ssh/YYY/id_rsa Host X01 X02 ...


1

I would attempt to put the arguments to ssh in double quotes. ssh usr@machene_wehere_i_run_the_code "/home/run_dir_script/run.sh inp 8" Also based on that error message it sounds like the script cannot find this script: /home/run_dir_script/run.sh: line 59: /home/run_dir_script/merge_tabs.sh: No such file or directory Also I'd block the scp from ...


1

There is nothing after on the line after ssh -X usr@machene_wehere_i_run_the_code in your code. So that command logs in on machene_wehere_i_run_the_code and does nothing. In the example ssh call in the accepted answer of the question you quote there is an extra parameter: ssh user@host path_to_script and the path_to_script is missing in yours.


1

Assuming that you have control over your home network, and that there you setup your internal IP address fixed (e.g. based on the MAC address of your home PC), then you can open up a port (e.g. 4321) on your home router to forward to your PC also on 4321. At home make sshd listen on that port. Create a new user locally as you (of course) don't want to use ...


3

It's easy: [execute from office machine] Setup connection Office -> Home (as Home has public IP). This will setup reverse tunnel from your office machine to home. ssh -CNR 19999:localhost:22 homeuser@home [execute from home machine] Connect to your office from home. This will use tunnel from the step 1. ssh -p 19999 officeuser@home Please ensure, that ...


1

Older versions of ssh-keygen don't generate all the available keys (eg. no support for ecdsa and sha256). This script does creates all the records for all available keys in /etc/ssh/: #!/bin/bash # # Creates SSHFP Records vor all available keys # HOST="$1" if (($# < 1)) then echo "Usage: sshfpgen <hostname>" exit 1 fi for pubkey in ...


1

You should use rrsync (probably available gzipped on your system e.g. in /usr/share/doc/rsync/scripts/) and associate a line in your authorized_keys file with the public key installed there for the rsync: command="$HOME/bin/rrsync -ro ~/rsyncdir/",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding If necessary more detail can be ...


3

Add in a "/" before "home", unless you are executing this from present working directory of / . If not, you'll need to provide some more info such as whether the ssh auth works and what permissions are like on source and dest dirs.


2

To save the passphrase, use seahorse-ssh-askpass from package seahorse: cd $HOME/.ssh /usr/lib/seahorse/seahorse-ssh-askpass my_key Make sure that the public key is the filename of the private key plus .pub, in the example my_key.pub To automatically use the key afterwards, see "Gnome Keyring dialog and SSH" and at first use, check "Automatically unlock ...


0

If nohup can open up its output file you may have a clue in nohup.out. It is possible python is not on the path when you run the script via ssh. I would try creating a log file for the command. Try using: nohup /usr/bin/python3 -u <script> &>logfile &


0

I think it's because the job is tied to the session. Once that ends any user jobs are ended too.


2

sftp -o Port:8777 'user@domain.com'@domain.com This would also work, although its really quite poor form for them to provision users with this type of name.


1

If you wish to delete remote file with the use of sudo, you need to execute something like this: ssh -tt user@host 'stty raw -echo; sudo rm /path/to/file' < <(cat) Details.


3

Since you can only run su - other_user to get access to that account, there are things you can't do. You can only run the login shell of that account or programs that the login shell allows you to run. This doesn't make a difference if the login shell is a general shell like sh or bash, but it does if the shell is a restricted shell or some kind of ...


4

Does this security policy make sense? Yes and no. No in the sense that it does not protect other_user's data. But it does protect other_user's password. This may seem inconsequential, but that means there is at least one important thing you cannot do: change the password so that the person who normally uses the account can't access it. Another ...


1

You have successfully authenticated and logged in — you're seeing the motd. In normal circumstances, the reason for not getting a shell prompt would be that the shell initialization files (/etc/profile, ~/.profile or similar) contain a command that takes a long time (maybe even never returns). Pressing Ctrl+C should interrupt that command and give you a ...


1

Instead of wondering how to cope with a complex chain of SSH forwardings, separate the problems. Configure your system to have transparent access to every host. This is done once and for all in your ~/.ssh/config file. To teach SSH to use a machine as a proxy to another machine, declare a ProxyCommand . Host priv-server User user ProxyCommand ssh -W ...


1

Just adding to the answer, an easy way to tell your address (ip/domain), is to ssh into a computer you can ssh into, exit and then ssh back into it again. Most times, you'll see a welcome message like: "Last login at xx:xxpm from you.domain.com/ip.ad.dre.ss"


0

New answer after reading up more on the iconv flag and the added information to the question. According to their FAQ: http://rsync.samba.org/FAQ.html You can avoid a charset problem by passing an appropriate --iconv option to rsync that tells it what character-set the source files are, and what character-set the destination files get stored in. ...


0

Try to narrow down your problem. check dmesg to see if there's something obviously wrong. Does the internet connection come back up? if not, how do you get it back up? Are you using dhcp or static ip? is it configured on /etc/network/interfaces ? if so, post your config


0

You have to install tmux 1.8 or newer on remote host. Then run tmux -CC in SSH session of this host and iTerm2 will attach to tmux running in this session.



Top 50 recent answers are included