- if (stat(filename, &st) < 0) {
- /* ignore this key */
- return KEY_UNSPEC;
- }
- public = key_new(type);
- if (!load_public_key(filename, public, NULL)) {
- /* ok, so we will assume this is 'some' key */
- type = KEY_UNSPEC;
- }
- key_free(public);
- return type;
+ /* XXX should be pre-session */
+ ssh_init_forwarding();
+
+ id = no_shell_flag ? -1 : ssh_session2_command();
+
+ /* If requested, let ssh continue in the background. */
+ if (fork_after_authentication_flag)
+ if (daemon(1, 1) < 0)
+ fatal("daemon() failed: %.200s", strerror(errno));
+
+ return client_loop(tty_flag, tty_flag ? options.escape_char : -1, id);